Seros Interactive Map Server is the back end (API) for my Dungeons and Dragons companion app. An app created to track various entries consisting of sublocations, characters, quests and combat instances all of which are assigned under the banner of a unique location represented by a pin on the map. It also allows for the creation of multiple campaigns so all created notes can be isolated to one campaign.
In the project directory, you can run:
npm install
Installs the relevant dependancies.
npm start
Starts the server on port 5000
npm dev
Starts the server on port 5000 using nodemon to apply hot reloads.
Express: https://expressjs.com/
Mongoose: https://mongoosejs.com/
JWT: https://jwt.io/
This app uses a .env
file to keep any secrets secure so you will need to create a .env
file and ensure the variables located in that file have relevant values. These variables include:
NODE_ENV
- should be set to "development" ACCESS_TOKEN_SECRET
- a unique secret codeREFRESH_TOKEN_SECRET
- a unique secret codeMONGODB_URI
- a relevant mongoDB URI CORS_ORIGIN_URL
- the url assigned to the front end of this applicationOnce these variables have been set the application can be started with the relevant command.
Upon user account creation, sensitive user data is hashed then stored in the user collection.
The API performs CRUD operations on the various data types contained within the database collections. These include:
Schemas for these can be found within the \models
folder.
Endpoints for these data types can be found within the \routes
folder.
Users are authorized through the use of JSON Web Tokens, to ensure that only specific users are able to access the relevant data.
seros-interactive-map-client repository: https://github.com/JackSalloway/seros-interactive-map-client
The things I would like to implement for the future of this app are as follows: