Skip to content

Spectra010s/mcl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

642 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

My Campus Library

An open-source digital library and study desk for students and faculty, providing access to academic materials and focused on empowering knowledge for every student

Overview

A high-performance academic resource management system built with Next.js, TypeScript, and Supabase. The platform provides a centralized hub for students to access, download, and contribute study materials while implementing a robust administrative workflow for content moderation.

Features

  • Hierarchical Browse: Navigate resources organized by Faculty → Department → Academic Level → Course
  • Full-Text Search: Search across keywords, course codes, and filenames
  • Anonymous Access: Browse all resources without authentication
  • User Accounts: Create account to download resources, create bookmarks
  • Contributions: Faculty and students can upload resources
  • Community Ratings: Download, bookmarks and views counts on resources to help other students
  • Admin Dashboard: Moderate and manage resources at /admin (admin role required)

Tech Stack

  • Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS
  • Database: PostgreSQL (Supabase)
  • Authentication: Supabase Auth
  • Deployment: Vercel

Getting Started

Prerequisites

  • Node.js 20+
  • Supabase account
  • Vercel account (for deployment)

Installation

  1. Clone the repository:

    git clone https://github.com/Spectra010s/mcl.git
    cd mcl
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.example .env.local
  4. Fill in your Supabase credentials in .env.local

  5. Run database migrations:

  • Open your Supabase dashboard
  • Go to SQL Editor
  • Copy and run the script from scripts/schema.sql
  1. Start development server:
    npm run dev

Visit http://localhost:3000 to see the application.

Setting Up Your First Admin

  1. Sign up through the app at /signup
  2. Go to your Supabase Dashboard > Table Editor > users
  3. Find your user record and change role from user to admin
  4. Log out and log back in
  5. Access admin features at /admin

Project Structure

├── app/                  # Next.js app directory
│   ├── about/            # About us page
│   ├── admin/            # Admin dashboard (role-protected)
│   ├── api/              # API routes files
│   ├── auth/             # Authentication pages
│   ├── browse/           # Browse by faculty → course
│   ├── cbt/              # Computer Based Test (CBT) engine
│   ├── cbts/             # CBT resource repository
│   ├── help/             # Help and FAQ page
│   ├── lib/              # App-specific logic and providers
│   ├── login/            # User login page
│   ├── privacy/          # Privacy policy page
│   ├── resource/         # Resource details and viewing
│   ├── search/           # Search interface
│   ├── serwist/          # Service worker configuration (PWA)
│   ├── settings/         # User settings and profile
│   ├── signup/           # User registration page
│   ├── terms/            # Terms of service page
│   ├── upload/           # Resource upload form
│   └── ~offline/         # Offline fallback page (PWA)
├── assets/               # MCL brand assets (logos, SVGs)
├── components/           # React and Page components
│   ├── providers/        # Context providers (Auth, Query)
│   └── ui/               # Shared UI primitives (shadcn)
├── constants/            # Global constants and config
├── data/                 # Static data and mock files
├── docs/                 # Full documentation
├── hooks/                # Custom React hooks
├── lib/                  # Utilities and configurations
│   ├── api/              # Backend API clients
│   ├── parser/           # Document and file parsers
│   ├── schema/           # App logic schemas
│   └── supabase/         # Supabase client and database logic
├── public/               # Static assets (icons, manifest)
├── schemas/              # SEO and structured data schemas
├── scripts/              # Database migrations
│   └── legacy/           # Legacy scripts and tools
└── test/                 # Test suites (app, components, lib)

View Full Directory Specification

For detailed documentation, see the /docs folder.

Contributing

We welcome contributions! Please read our CONTRIBUTING.md for guidelines.

Community & Support

See SUPPORT.md for detailed support information.

License

This project is licensed under the MIT License - see LICENSE file for details.

Code of Conduct

Please review our CODE_OF_CONDUCT.md before participating in this community.

Roadmap

  • Admin resource moderation dashboard
  • In-browser file preview (PDF/Image viewer)
  • Advanced analytics dashboard (Resource popularity, activity tracking)
  • Advanced search filters (by level, department)
  • Resource recommendations
  • API documentation
  • Mobile app
  • Multi-language support

Acknowledgments

Built with love for the academic community by students, for students.

About

Empowering knowledge for every students

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors