This project consists of a client-side Next.js application and a server-side Express application with PostgreSQL database.
- Clone this repository:
git clone https://github.com/nxvafps/code4change.git
cd code4change
- Install all dependencies (client and server):
npm run install:all
Or install separately:
npm run install:client # Install client dependencies only
npm run install:server # Install server dependencies only
The client is built with Next.js and bootstrapped using create-next-app
.
- Navigate to the client directory:
cd client
- Start the development server:
npm run dev
The application will be available at http://localhost:3000.
You can edit the page by modifying client/app/page.tsx
. The page auto-updates as you edit the file.
- Node.js and npm installed
- PostgreSQL installed and running
- Create the necessary databases using the setup script:
cd server
npm run setup-db
This will create three databases:
- db_name_dev (Development)
- db_name_test (Testing)
- db_name_prod (Production)
Create three environment files in the server/app
directory:
.env.development
:
PGDATABASE=db_name_dev
.env.test
:
PGDATABASE=db_name_test
.env.production
:
PGDATABASE=db_name_prod
- Seed the database:
cd server
npm run seed
- Start the development server:
npm run dev
- Next.js Documentation - features and API
- Learn Next.js - interactive tutorial
NA
NA