Giter Club home page Giter Club logo

falloutshelterbackend's Introduction

Fallout Shelter Backend Challenge

Principles:

  • SRP - Single Responsability Principle
  • OCP - Open Closed Principle
  • LSP - Liskov Substitution Principle
  • ISP - Interface Segregation Principle
  • DIP - Dependency Inversion Principle
  • SOC - Separation of Concerns
  • DRY - Don't Repeat Yourself
  • KISS - Keep It Simple, Silly
  • Composition Over Inheritance
  • Small Commits

Design Patterns:

  • Factory
  • Decorator
  • Adapter
  • Dependency Injection

Methodology and Design:

  • TDD
  • Conventional Commits
  • Modular Design

Top Level Architecture Design

Add Dweller Controller

alt text

Get Dweller By Id Controller

alt text

Query Dweller Controller

alt text

Move Time Controller

alt text

Swagger Support

alt text

Test Driven Development is awesome!

  • Coverage over all core system

alt text

CI/CD

  • Circle/CI
  • Deploy image to Docker Hub alt text

Why use decorator to handle with move time and how its works

Without this decorator, every time that we want to set a new time with move-time route, we would need to change all rows/keys in our database updating dweller age, this could be very costly over time as data grows. So with this decorator we handle with this issue by make just a request to a saved date in out database and make the difference between dweller and date, avoiding update all rows/keys everytime that we want to set a new time.

alt text

Summary

Welcome to the Fallout Shelter Underground Vault, where you act as the Overseer with the ability to:

  • Retrieve information regarding each dweller in the Vault
  • Allow dwellers to enter the Vault
  • Retrieve all information regarding a specific dweller by providing their user ID
  • Query the Vault for dwellers that match a specific search filter (i.e: haircolor, eyecolor, age, name)
  • Move time forward to retrieve a search result with dwellers and their updated ages

Please follow along to setup the environment and run the application.

Start Application

  • Make sure to have docker and Makefile installed
  • Rename ".env.example" file to .env
  • To run tests: make unit-test
  • To run api in development mode: make dev
  • You can test the api opening swagger docs or calling each specific route
  • localhost:3000/api-docs
  • localhost:3000/add-dweller - POST
  • localhost:3000/get-dweller-by-id/:id - GET
  • localhost:3000/query-dweller - POST
  • localhost:3000/move-time - POST

To-Do

  • Migrate database to DynamoDb - in progress
  • Migrate image deploy to ECR - Done

falloutshelterbackend's People

Contributors

mayconcarlete avatar

Watchers

 avatar  avatar

falloutshelterbackend's Issues

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.