In this project seeks to design a dashboard for student. On the dashboard, the user has the ability to select a name from the list of students in the database with the corresponding cohort. When the selected details is correct, the cooresponding details of the student, i.e attendance and scores shall appear on the tiles of the frontend.
This project makes use of djnago's restframework as an API in conjunction with react as a frontend to accept data from a user and save into the AWS Postgres database.
The application shall be hosted on AWS using the AWS Elastic Container Registry to host the images whiles utilizing the Elastic Container Services to run the application's images in AWS Fargate instances.
The frontend of the apllication runs on react and nodejs. The responsive frontend was designed to receive dynamic information and display results to the dashboard of the user. To run the frontend of the application, you can simply run the docker file into a docker image and run it on your local computer.
Clone the frontend files fron this repository using this command
git clone https://github.com/PabloJermin/Project_Nebula_Frontend.git
Change directory into the cloned folder with this command
cd Project_Nebula_Frontend
-
Use this code to run the docker file;
docker build -t <name_of_image> . -
This builds an image from the docker file with the name provided above.
NOTE: Use
docker imagesto check all images avalable on you docker. -
Run the image into a container using the following codes
docker run <inamge_name> -d -p 3000:3000
Now your application will be available on localhost:3000.
-
In your clone repository, install the
npmmanager using this commandnpm installNote: Make sure Node.js is installed on your local computer. Follow this link to install the Node.js application.
-
After installing the Node.js application and the
npmpackages, run this command in your terminal to start the application.npm start
To install the django backend system, navigate to your Project directory. cd project-name or create the directory using mkdir project-namein your favorite code editor or command prompt.
-
In the project directory, create your environment using this command:
python virtualenv venvthis creates a virtual envrinment in your directory called
venv. -
Activate your virtual environment using this command:
For windows
venv\Scripts\activateFor Mac
source venv/bin/activate -
Clone the project from this repository into your directory using this command:
git clone https://github.com/PabloJermin/Project_Nebula.git -
Now, install the dependencies and django application from the requirements.txt file like this:
pip install -r requirements.txtAll the required dependencies shall be installed in your virtual environment.
-
Create your environment variable file at the root of the folder with your database credentials using the format and save as
.envDB_HOST='your_host_name' DB_PASSWORD='your_pasword' DB_USER='your_username' DB_NAME='your_name' DB_ENGINE='django.db.backends.postgresql' DB_PORT=5432 -
Finally, run the backend server
python manage.py runserverthis runs the server on your
localhost:8000. However, ensure your database application is already running before starting the backend application to avoid errors.
Now your backend is running...
-
Clone the project from this repository into your directory using this command:
git clone https://github.com/PabloJermin/Project_Nebula.git -
Change directory into the folder using
cd Project_NebulaNOTE: Ensure that the environment variable file
.envhas been created. -
Now create the image from the dockerfile using this command
docker-compose up --build
Now your backend is running...
Before running the application, ensure that the database has been properly setup and running on the AWS platform.
To setup the django backend to interacts with your personal database,
- navigate to the Nebula folder and open the Settings.py file.
- Scroll to the DATABASE section and replace the variables with your credentials and save the file with
ctrl + s. - Run
to effect your changes and make django intigrate with your databse.
python manage.py makemigrations - Finally, run
to effect all your data into your database.
python manage.py migrate
Now the application is running on your personal database..
Interact with the application on the localhost of your browser by copying this link into your favorite browser localhost:8000/api.
In your browser, navigate to "/students" to display all students in the database. Your browser should look like this
.png)
A sincere gratitude is extended to my team members who have masively contributed to the success of this project. And to @ErnAzubi for his contribution to the frontend version of the project.