Skip to content

Kateryna-7/code4change

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code4Change

This project consists of a client-side Next.js application and a server-side Express application with PostgreSQL database.

Quick Start

  1. Clone this repository:
git clone https://github.com/nxvafps/code4change.git
cd code4change
  1. 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

Client Setup (Next.js)

The client is built with Next.js and bootstrapped using create-next-app.

Running the Client

  1. Navigate to the client directory:
cd client
  1. 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.

Server Setup (Express + PostgreSQL)

Prerequisites

  • Node.js and npm installed
  • PostgreSQL installed and running

Database Setup

  1. 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)

Environment Configuration

Create three environment files in the server/app directory:

  1. .env.development:
PGDATABASE=db_name_dev
  1. .env.test:
PGDATABASE=db_name_test
  1. .env.production:
PGDATABASE=db_name_prod

Running the Server

  1. Seed the database:
cd server
npm run seed
  1. Start the development server:
npm run dev

Additional Resources

Next.js Documentation

Contributing

NA

License

NA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 84.2%
  • CSS 13.7%
  • JavaScript 1.6%
  • Shell 0.5%