| .forgejo/workflows | ||
| public/error-imgs | ||
| scripts | ||
| src | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| LICENSE | ||
| next.config.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| include_toc |
|---|
| true |
Table of Contents
UL Lab Timetable System
A modern full-stack Department Lab Timetable System for managing lab room bookings, built with Next.js, Supabase, and a Git-powered DevOps workflow.
Features
- View available labs in real time
- Create, edit, and delete bookings
- Admin approval workflow
- Room management (available / under maintenance)
- Mobile-friendly UI
- Git LFS + CI/CD integration
- Clean, extensible project structure
Tech Stack
Frontend
- Next.js (App Router)
- TailwindCSS
- React components under
src/components/ - Pages located in
src/app/
Backend
- Supabase
- Authentication (Students, Staff, Admins)
- Database & tables
- API routes using Supabase client
DevOps
- Git LFS support
- Forgejo CI in
.forgejo/workflows/ - GitHub-Actions-compatible pipelines
- Organized repo structure
Tools & Project Management
Kanban Board
A basic Kanban board is available under the Projects tab.
CI/CD
A GitHub-Actions-compatible CI/CD runner is provided in the Actions tab.
This pipeline runs automatically or can be triggered manually.
Repository Components
Not every file is required (such as `.mailmap), but most are strongly recommended.
LICENSE
This repository uses the MIT License by default.
You may dual-license (e.g., MIT + Apache) by including additional license files such as:
LICENSE-MITLICENSE-APACHE
Without a license, a project is source-available, all rights reserved.
.gitignore
Controls which files Git is allowed to track.
It prevents committing unwanted files like:
- build artifacts
- environment files
- secrets
.gitattributes
This file manages:
- Consistent line endings across macOS, Windows, and Linux.
- Git LFS (Large File Storage) configuration for binary files.
Git works best with text files.
Git-LFS stores large/binary files outside the main repo to prevent bloat.
Git-LFS installer: https://git-lfs.com/
.forgejo/workflows/check_lfs.yaml
A CI pipeline that triggers on:
pushpull_requestworkflow_dispatch
Its purpose is to verify all required files are correctly stored in Git-LFS.
If additional pipelines are created later, integrate LFS checks into them.
GitHub Compatibility
To use this workflow on GitHub:
Rename .forgejo ➝ .github
Directory Structure
src/
Recommended location for your project’s source code. This is a common industry convention.
Useful but Optional Files
.mailmap
Git associates commits by email, so contributors with multiple emails may appear multiple times.
.mailmap merges them into a single identity or corrects name/email mistakes.
Docs: https://git-scm.com/docs/gitmailmap
.gitkeep
Git does not track empty folders.
To commit an empty folder (e.g., src/, doc/ before adding files), include a .gitkeep file.
Once real files exist, .gitkeep may be removed.
Updating
If any base files (e.g., .gitignore, .gitattributes, check_lfs.yaml) receive updates later, you should backport those changes into your project to keep everything consistent.
Prerequisites
Before running the project, make sure you have the following installed:
-
Node.js 18+
Download: https://nodejs.org -
npm (version 9 or higher)
Comes with Node, but you can verify by running:npm -v
Running the Project (Local Deployment)
1️. Install Dependencies
Make sure you have Node.js installed, then run:
npm install
2️. Check Environment Variables
Ensure there is a .env.local file in the root of the project containing:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Only needed for admin features / server-side actions:
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
(These values come from the Supabase project.)
3️. Start the Development Server
Run the following command to start the development server:
npm run dev
The app will now run on:
http://localhost:3000
4️. Build for Production (Optional)
If you want to simulate a production build locally:
npm run build
npm start