EcoSync is a full-stack application built with Next.js, Express.js, Prisma, and PostgreSQL.
The project is divided into two main directories:
/client
- Contains the Next.js frontend application./server
- Contains the Express.js backend server, which uses Prisma for ORM and PostgreSQL as the database.
Before you begin, ensure you have installed:
- Node.js and npm
- PostgreSQL
- Clone the repository:
git clone https://github.com/definecoder/CS24-p2-define-coders.git
- Install the dependencies in both the
/client
and/server
directories:
cd EcoSync/client
npm install
cd ../server
npm install
In the /server
& /client
directory, rename .env.example
to .env
and fill in your PostgreSQL database details with you postgres password e.g: "postgresql://postgres:YOURPASSWORDHERE@127.0.0.1:5432/ecosync"
and other environment variables from this google doc link.
- Start the backend server:
cd EcoSync/server
npx nodemon
- In a new terminal window, start the frontend application:
cd EcoSync/client
npm run dev
The frontend application will be available at http://localhost:3000
, and the backend server will be running at http://localhost:8585
(or whatever port you specified).
{
"SYSTEM_ADMIN": {
"email": "admin@admin",
"password": "admin"
},
"LAND_MANAGER": {
"email": "codermehraj@gmail.com",
"password": "admin"
},
"STS_MANAGER": {
"email": "shafinnafiullah@gmail.com",
"password": "admin"
}
}