JackSalloway / seros-interactive-map-server

Back end (API) for my interactive map project
2 stars 0 forks source link

seros-interactive-map-server

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.

Scripts

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.

Tech

Express: https://expressjs.com/

Mongoose: https://mongoosejs.com/

JWT: https://jwt.io/

Using The App

Getting Started

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:

Once these variables have been set the application can be started with the relevant command.

Understanding The API

Creating And Storing Data

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.

User Authorization

Users are authorized through the use of JSON Web Tokens, to ensure that only specific users are able to access the relevant data.

Relevant Links

seros-interactive-map-client repository: https://github.com/JackSalloway/seros-interactive-map-client

Next steps

The things I would like to implement for the future of this app are as follows: