To start the mongodb database in detached mode, run the following:
docker compose up --build -d
To start the mongodb database in debug mode, run the following (You may exit debug mode by pressing Ctrl + C):
docker compose up --build
To stop the mongodb database after starting, run the following:
docker compose down
Validation happens after running. Data is either valid or invalid based on the schema.
docker compose up --build
Use JSON Schema to create a schema which can be used with AJV https://json-schema.org/learn/getting-started-step-by-step
CONOPS for cities
- UI: Start Menu -> new & load and Quit
- Start Menu creates UUID that is saved in DB under accounts
- accounts schema has 3 saved files which is just the amount of cities
- 2 modes which are census (GET) and nuke (POST/DELETE)
- census and nuke mode are in a map or table mode
- can export the map to svg or png
- can export the table to excel or png
- can select cities on map or table in census or nuke mode
- nuke mode has 3 nukes: Fat Man, ICBM, and Tsar Bomba
- destroys (deletes) cities that are within it's blast radius
- radiates (post) cities that are within it's radiation radius
- Auto save with icon every time user edits cities in database
- Warning when user switches to nuke mode about irreverseable consequences. Click ok to proceed further
- 2 microservices one for each mode
- Factory pattern to make a new mode https://itnext.io/4-ways-to-implement-factory-pattern-in-javascript-2e019c2a9ada
- Observer pattern for backend to listen to frontend and vice versa https://dev.to/patferraggi/do-you-need-design-patterns-in-functional-programming-370c
- Facade pattern for complicated code https://blog.webdevsimplified.com/2022-07/facade-pattern/