Skip to content

threehappypenguins/campus-booking

Repository files navigation

Campus Classroom Booking System

A Next.js application for booking classrooms at IT Campus when they're not in use.

Tech Stack

  • Frontend/Backend: Next.js 14 (App Router) + TypeScript
  • Styling: Tailwind CSS
  • Database: Supabase (PostgreSQL)
  • Deployment: Vercel + Supabase Cloud

Prerequisites

  • Node.js 18+ and npm
  • Git
  • A Supabase account (free tier is fine)

Getting Started

1. Clone the Repository

git clone https://github.com/threehappypenguins/campus-booking.git
cd campus-booking

2. Install Dependencies

npm install

3. Prepare your .env file

Bash/zsh:

cp .env.example .env.local

Powershell:

copy .env.example .env.local

4. Obtaining the Supabase API keys

  • Make sure you're logged into Supabase
  • Navigate to the Data API page and copy the Project URL and paste it into .env.local
  • Navigate to the the API Keys page and copy the anon public key and paste it into .env.local

Never commit your .env file to Git! It's already in .gitignore.

5. Start the Development Environment

To run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

6. Verify Everything Works

Open http://localhost:3000 with your browser to see the result.

Database Setup (For Database People)

Using Supabase Dashboard

  1. Go to the Supabase project > SQL Editor
  2. Paste and run the SQL from supabase/schema.sql
  3. Use the Table Editor to view/modify data

Completing Issues

To complete your issue you’re going to need a branch for the issue. All your branches should be created from dev, not main. You can do either git checkout -b <branch_name> dev on the command line or you can use VS Code’s visual tool. Click on the branch name on the bottom left of your editor and it will pop up a box at the top that has an option "Create new branch from…"

VS Code Branch Menu

VS Code Branch Menu

Before making your pull request, make sure you run all tests and run npm run build. Any code you’re proposing to commit is expected to be in a functional state.

Pull requests can be created on Github. Link the issue. This can be done by added closes #<issue_number> in your PR description.

Merging changes from main into your branch

Sometimes, while you're working on your branch, someone will make changes that are merged to main and you might need those changes into your branch.

  • In the Source Control tab, hover over "Changes" to select the 3 dots and click.
  • Select Fetch to get the latest commits from GitHub without changing your local branches yet.
  • This will pull the updates from main into your local Git history.
  • In the bottom-left branch menu, select the branch you want to update (if you're not already on it).
  • Open the Command Palette: Ctrl + Shift +P (Windows) or Cmd + Shift+ P (Mac).
  • Type Git: Merge Branch → select it.
  • Select main as the branch to merge into your current branch.
  • VS Code will attempt the merge. If there are conflicts, the editor will show you in the GUI with options to accept changes.

About

An app for viewing classroom availability and booking individual workstations or entire rooms during open time slots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors