Giter VIP home page Giter VIP logo

zombie-survival-social-network's Introduction

Zombie Survival Social Network

> 🧟 A simple REST api to help survivors of a zombie apocalypse.

Technologies UsedHow To UseContributingLicense

Made with ❤️ by Alvaro Israel 👏🏻 Get in Touch!

Hit the ⭐️ button if you like this project!

Preview

🏆 Technologies Used

💻 How to Use

Install system dependencies

Clone

In your command line:

$ git clone https://github.com/AlvaroIsrael/zombie-survival-social-network.git

# Move into project folder
$ cd zombie-survival-social-network

# Install dependencies
$ yarn install

# Run the app
$ yarn start

🤝 Contributing

Fork this repository - click fork.

# Create your feature branch:
$ git checkout -b feature/myAwesomeFeature

# Commit your changes:
$ git commit -m 'feat: Added some new awesomeFeature'

# Push to the branch:
$ git push -u origin feature/myAwesomeFeature

Then go to Pull Requests and make a new one.

Resources:

📝 License

This software is under MIT license. See LICENSE for more details.

zombie-survival-social-network's People

Contributors

akulagrawal avatar alvaroisrael avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

varunanandk

zombie-survival-social-network's Issues

Marcar usuário como infectado.

  • Em uma situação caótica como essa, é inevitável que um usuário do sistema venha a ser contaminado.
  • Nesse caso, o mesmo deve ser atualizado no sistema como infectado.
  • Um usuário infectado não pode realizar escambo, não pode manipular seu inventário nem ser listado nos relatórios (para fins práticos, o mesmo está inativo).
  • Um usuário é considerado infectado quando ao menos 3 outros usuários distintos do sistema reportaram sua contaminação.
  • Ao ser infectado, todos os itens do inventário do usuário ficam inacessíveis.

Cadastrar usuários na base.

  • Um usuário é definido basicamente por seu nome, idade, sexo e última localização (latitude, longitude).
  • Ao ser criado, um usuário irá conter um inventário de itens que o mesmo detem (inicialmente vazio).

Migration path issue

While running : npm run knex:migrate

Output :
npx knex migrate:latest --knexfile src/config/knexfile.ts
Requiring external module ts-node/register
Working directory changed to ~/xxxxx/zombie-survival-social-network/src/config
Error: ENOENT: no such file or directory, scandir xxxx/zombie-survival-social-network/src/config/src/database/migrations

Create a base column function avoid duplicating code

Create a function to return the stable columns and call in every tables

example :
Below column is using in all three tables

tableBuilder.string('createdAt').notNullable().defaultTo(knex.fn.now());
tableBuilder.string('updatedAt').notNullable().defaultTo(knex.fn.now());

Relatórios

  • Porcentagem de usuários infectados;
  • Porcentagem de usuários não-infectados;
  • Quantidade média de cada tipo de item por usuário (águas/usuário, comidas/usuário, etc);
  • Número de pontos perdidos por usuários infectados;

Escambo de bens.

  • Usuários do sistema podem trocar bens entre si.
  • Para isso, a tabela de equivalência abaixo será utilizada.
  • Todos os escambos devem conter saldo final zero, ou seja, os dois usuários devem negociar a mesma quantidade de pontos.
  • Não é necessário realizar o registro do escambo, apenas transferir os itens entre os dois usuários.
Item Pontos
1 Água 4 pontos
1 Comida 3 pontos
1 Remédio 2 pontos
1 Munição 1 ponto

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.