This Django project is a comprehensive solution for managing reviews on dealerships, leveraging the power of MongoDB for data storage and two Node.js applications for backend processing and interaction with the database. This project is designed to efficiently handle large volumes of data, thanks to MongoDB's scalability and flexibility.
The Node.js applications play a crucial role in the backend, acting as intermediaries between the Django frontend and the MongoDB database. They handle data processing tasks, ensuring that the data flowing between the frontend and the database is clean, efficient, and secure. These applications can perform complex operations, such as data validation, aggregation, and transformation, before the data is stored in MongoDB. This dual-layered architecture ensures that the system is robust, scalable, and capable of handling high volumes of user interactions and data transactions.
To run the project, you need to install Node, Kubernetes and Docker
Clone the project
git clone https://github.com/sergiogr0702/ibm_fullstack_developer_capstone.git
Go to the project directory
cd ibm_fullstack_developer_capstone
Launch a new terminal, go to carsInventory folder, build docker image and deploy with docker compose to run the cars Mongo database
cd server/carsInventory
docker build nodeapp .
docker-compose up
Launch a new terminal, go to carsInventory folder, build docker image and deploy with docker compose to run the dealershrip Mongo database
cd server/database
docker build nodeapp .
docker-compose up
Launch a new terminal and deploy the sentiment analyzer microservice with docker
cd server/djangoapp/microservice
docker build -t sentiment_analyzer .
docker run -d -p 5000:5000 --name analyzer sentiment_analyzer
Install dependencies for the frontend react application and build the production code
cd server/frontend
npm install
npm run build
Build the main Django app docker image and run it on kubernetes
cd server
docker build -t dealership .
docker push dealership
kubectl apply -f deployment.yaml
kubectl port-forward deployment.apps/dealership 8000:8000
Or built on local with a Python virtual enviorment
cd server
pip install virtualenv
virtualenv djangoenv
source djangoenv/bin/activate
python3 -m pip install -U -r requirements.txt
python3 manage.py makemigrations
python manage.py migrate --run-syncdb
python3 manage.py runserver
Once the apis are running, you will need to copy the urls and add the following environment variables to your .env file
backend_url
The url where the dealerships mongo-node app is running
searchcars_url
The url where the cars mongo-node app is running
sentiment_analyzer_url
The url where the sentiment analyzer node app is running