This guide will help you set up the environment for the ProjectConnect project. The system architecture consists of a server running Python and Node.js, a client running Next.js with React, and a PostgreSQL database.
- Run the following command in administrator mode PowerShell or Command Prompt to install Python 3.7.9:
choco install python --version=3.7.9
- Run the following command in your terminal to install Python 3.7.9:
brew install @3.7.9
- Link Python 3.7 as the default version:
brew link python@3.7
Creating a virtual environment helps to isolate project dependencies and avoid conflicts with system-wide packages.
- Install virtualenv:
pip install virtualenv
Windows:
python3 -m venv venv
venv\Scripts�ctivatemacOS/Linux:
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txt- Flask (2.2.5): Web framework for creating APIs.
- SQLAlchemy (2.0.21): ORM for handling database operations.
- Alembic (1.12.0): Database migrations.
- psycopg2-binary (2.9.9): PostgreSQL adapter for Python.
- Ensure that you have Chocolatey installed. If not, follow the instructions on Chocolatey's official website.
- Once Chocolatey is installed, run the following command in an elevated (Administrator) PowerShell or Command Prompt to install Node.js 23.0.0:
choco install nodejs --version=23.0.0
brew install node
npm install -g n
sudo n 23.0.0After pulling the project from the repository, navigate to the project directory and run:
npm installThis will install all the required Node.js, Next.js, React, and Bootstrap dependencies listed in the package.json file.
- Express (4.21.0): Fast web server for Node.js.
- Axios (1.7.7): HTTP client for making requests.
- Next.js (14.2.15): Framework for React applications with server-side rendering.
- React (18.3.11) and React-DOM (18.3.1): React libraries.
- Bootstrap (5.3.3): Frontend framework for responsive design.
- Chokidar (4.0.1) and Live-server (1.2.2): Development utilities.
- Download and install PostgreSQL from PostgreSQL official site.
- After installation, verify the version:
psql --version
- Log in to PostgreSQL and create a new database:
psql postgres CREATE DATABASE projectconnect;
- Ensure PostgreSQL is running on port 5432, which is the default port for PostgreSQL.
- Run Alembic migrations to set up the database schema:
alembic upgrade head
- Run the Next.js development server:
npm run dev
- Run the production server:
- Build the app:
bash npm run build - Run the Next.js produciton server:
npm start
- Open your browser and navigate to
http://localhost:3000.