Welcome to the ReDi Events project! This is a full-stack web application where users can create, join, and manage events.
The project has three parts:
- Frontend -- a Next.js + React app (what users see in the browser)
- Backend -- an Express + Prisma API (handles data and talks to the database)
- Database -- a PostgreSQL database running in Docker
Before you begin, make sure you have these two things installed:
Check if you already have it by running node -v in your terminal.
If you need to install it, we recommend using nvm (Node Version Manager):
macOS / Linux:
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# Close and reopen your terminal, then run:
nvm install 22
nvm use 22Windows:
Download and install nvm-windows (click on nvm-setup.exe in the latest release). Then open a new terminal and run:
nvm install 22
nvm use 22We use Docker to run the PostgreSQL database. This way you don't have to install PostgreSQL directly on your machine.
macOS (using Colima -- recommended)
Colima is a lightweight way to run Docker on macOS. It is free and works well.
Step 1: Install Homebrew (if you don't have it already)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Step 2: Install Docker and Colima
brew install docker docker-compose colimaStep 3: Start Colima
colima startYou need to run colima start once every time you restart your computer. After that, all docker commands will work normally.
Tip: If you want Colima to start automatically when you log in, run:
brew services start colima
To verify it's working:
docker psYou should see an empty table (no error). That means Docker is ready.
Windows (using Docker Desktop)
Step 1: Enable WSL 2
Open PowerShell as Administrator and run:
wsl --installRestart your computer when prompted.
Step 2: Install Docker Desktop
- Download Docker Desktop for Windows
- Run the installer
- Make sure "Use WSL 2 instead of Hyper-V" is checked during installation
- Restart your computer if asked
Step 3: Start Docker Desktop
Open Docker Desktop from the Start menu. Wait until the whale icon in the taskbar shows "Docker Desktop is running".
To verify it's working, open a terminal and run:
docker psYou should see an empty table (no error). That means Docker is ready.
Linux (Ubuntu / Debian)
Step 1: Install Docker
# Update packages
sudo apt update
# Install Docker
sudo apt install -y docker.io docker-compose-v2
# Add your user to the docker group (so you don't need sudo every time)
sudo usermod -aG docker $USERStep 2: Log out and log back in (this is needed for the group change to take effect).
Step 3: Start Docker
sudo systemctl start docker
sudo systemctl enable dockerTo verify it's working:
docker psYou should see an empty table (no error). That means Docker is ready.
This project includes a .nvmrc file that specifies which Node.js version to use. Run this from the project root:
nvm useThis reads the .nvmrc file and switches to the correct version (v22). If you see an error saying the version is not installed, run nvm install first.
What is
.nvmrc? It's a small file that just contains a Node.js version number (likev22). When you runnvm usein a folder that has this file, nvm automatically switches to that version. This way everyone on the team uses the same version.
npm run db:upThis starts a PostgreSQL database inside a Docker container. You only need to do this once per coding session.
How do I know it's working? Run
docker compose ps-- you should see a container with status "Up".
cd backend
cp .env.example .env
cd ..This creates your .env file (with the database connection). You need this before installing dependencies because the backend uses Prisma, which requires the .env file during installation.
npm run install:allcd backend
npm run prisma:push
cd ..This creates the database tables based on the Prisma schema.
Open two separate terminal windows:
# Terminal 1 - Backend (http://localhost:4000)
npm run start:backend# Terminal 2 - Frontend (http://localhost:3000)
npm run start:frontendOpen http://localhost:3000 in your browser to see the app.
Stop the database container:
npm run db:downS26-Full-Stack-Circle/
├── frontend/ # Next.js + React application
├── backend/ # Express + Prisma REST API
├── docker-compose.yml # PostgreSQL database container
├── .nvmrc # Node.js version for nvm (v22)
└── package.json # Root scripts (install, start, db)
| Command | What it does |
|---|---|
npm run db:up |
Start the PostgreSQL database |
npm run db:down |
Stop the PostgreSQL database |
npm run install:all |
Install dependencies for both frontend and backend |
npm run start:backend |
Start the backend server |
npm run start:frontend |
Start the frontend server |
- Frontend README -- how the React app works
- Backend README -- how the API and database work