Embark is a React + Express Full-Stack Application that is fully deployed using Heroku. This is a demo. The users aren't real, and this isn't linked to any production environment.
These accounts are seeded by Knex every time the server restarts. You can also register your own account as a sponsor or inbound. Admin
- Email: [email protected]
- Password: test Sponsor:
- Email: [email protected]
- Password: test Inbound:
- Email: [email protected]
- Password: test
The React App has the following functionalities:
- 🌎A home page that has Navbar to allow for users to easily navigate the webpage.
- 🚀Sponsors and inbound guardians can register a new account and select their role.
- 📬 Once a sponsor is logged in, they can see a list of inbound guardians attached to them to get their contact information.
- 🧾 Once an inbound guardian is logged in, they can see a list of their tasks and their sponsor's contact information.
- ✏ An administrator can log in to assign inbound guardians to a sponsor.
- 📑 Sponsors and adminstrators can add tasks to an inbound guardian's checklist.
This project was designed with the intent of replacing the paper in-processing checklists. This website allows for a central location for sponsors and inbound guardians to easily get contact information for each other and to see required tasks for upcoming PCS moves.
Get more information about React here: https://reactjs.org/. It was styled using some MUI: https://mui.com/. Testing was completed using Cypress: https://www.cypress.io/ and Jest: https://jestjs.io/.
The following instructions are for those who want to develop the API on a local server.
- The server was made using Express.
Fork this repo, then clone it onto your machine.
The following dependencies need to be installed with npm install
- body-parser
- dotenv
- express
- jest
- knex
- morgan
- nodemon
- pg
- supertest
- bcrypt
Make a .env file and set the CONNECTION_STRING to equal the location of your database.
Embark uses a PostgreSQL docker container. Tables are created programaticly, but you will have to create the database throught the psql CLI.
-
Pull the PostgreSQL docker container.
docker pull postgres
-
Create volume, turn on container, log into container
-
mkdir -p $HOME/docker/volumes/postgres
-
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
-
docker ps -a
-
Copy the container ID from the output
-
docker exec -it <PSQL-Container-ID> bash
-
-
Create a DB called " zork_db "
dbcreate -U postgres zork_db
This was made with PostgreSQL DB to persist user data, maintain tasks, and provide relations between users and tasks.
This schema is created through the Knex Migrations and is built with command: npx knex migrate:latest