Group Project: Collaborative repository for our Computer Science project at UCD. Developing an innovative solution to businesses seeking optimal locations in New York. Code, docs, and communication hub for seamless teamwork. Stay tuned for updates on our progress!
Follow these steps to set up the project on your local machine:
Begin by cloning this repository to your local machine using the following command:
git clone https://github.com/minhlynguyen/ucd-project-advantage.git
It's recommended to create a virtual environment to isolate project dependencies. Navigate to the project directory and create a virtual environment:
cd django-backend-project
python -m venv venv
source venv/bin/activate
Install the project dependencies using pip:
pip install -r requirements.txt
Install Gdal: on Linux:
sudo apt-get update && sudo apt-get install -y binutils libproj-dev gdal-bin python3-gdal
On Macos: Follow the instructions in the link below:
https://gdal.org/index.html
Make sure you have installed Node.js and npm in your computer. You can check it by type the command in the terminal: check Node.js
node -v
check npm (Node Package Manager)
npm -v
If not installed yet, here is the official website: https://nodejs.org/en
For this project, recommended version is Node.js (v18.15.0) and npm (9.5.0).
All dependencies for front-end part are listed in /website/react-app/package.json
.
Go to front-end folder (/website/react-app
) and install all dependencies.
cd ./website/react-app/
npm install
after installing all the dependencies, we can run the dev environment.
cd ./website/react-app/
npm run dev
you can now build the frontend for deployment.
npm run build
This will create a folder called dist with all static files that need to be served
NOTE: For the fully functional database migrations, your database should be POSTGRESQL with PostGIS extension. Configure your database settings in settings.py and perform the initial migration to set up the database schema:
python manage.py makemigrations
python manage.py migrate
Start the development server to run the project locally:
python manage.py runserver
Access the Application: Open your web browser and navigate to http://localhost:8000/api/ to access the API endpoints provided by the backend.
website/website: The main project directory containing settings, URLs, and configuration. website/main, user_api, save_api: The apps' directory where you can define models, views, serializers, and other app-specific components. requirements.txt: A list of Python dependencies required for the project. website/manage.py: A command-line utility to interact with the project.