Skip to content

mayconcarlete/falloutshelterbackend

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages