Skip to content

CodeAcademyBerlin/codac-25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CODAC - Modern Learning Management Platform

Next.js TypeScript Prisma PostgreSQL

A comprehensive, production-ready learning management system built with Next.js 15, TypeScript, and modern web technologies. CODAC provides a complete educational platform with advanced content management, community features, and career services.

✨ Key Features

πŸ“š Learning Management System

  • Course Management: Create and organize multi-module courses with lessons and projects
  • Progress Tracking: Monitor student progress through comprehensive analytics
  • Enrollment System: Flexible enrollment management with role-based access
  • Quiz System: Interactive quizzes with multiple difficulty levels and automated scoring

πŸ“ Advanced Content Editor

  • Unified Editor: Plate.js-powered rich text editor with auto-save functionality
  • Media Support: Image, video, and file upload integration via Supabase Storage
  • Collaborative Features: Real-time editing with comments and suggestions
  • Export Options: Multiple format exports including Markdown and DOCX

πŸ‘₯ Community & Collaboration

  • Student Cohorts: Organize learners into cohorts with dedicated spaces
  • Mentorship Program: Connect students with mentors and schedule sessions
  • Discussion System: Built-in commenting and discussion features
  • User Profiles: Comprehensive user profiles with avatar management

πŸ’Ό Career Services

  • Job Board: Integrated job posting and application system
  • Career Tracking: Monitor job applications and career progress
  • Resume Builder: Tools for creating and managing professional profiles
  • Networking: Connect with alumni and industry professionals

πŸ” Security & Authentication

  • NextAuth.js Integration: Secure authentication with multiple providers (Google, GitHub)
  • Role-Based Access: Granular permissions for STUDENT, MENTOR, ADMIN, ALUMNI roles
  • Data Protection: Comprehensive validation using Zod schemas
  • Session Management: Secure session handling with proper token management

πŸ› οΈ Technology Stack

Core Framework

  • Next.js 15 - React framework with App Router and Server Components
  • TypeScript 5 - Type-safe JavaScript with strict mode enabled
  • React 19 - Latest React with concurrent features

Database & Backend

  • PostgreSQL 13+ - Robust relational database
  • Prisma 6.9 - Type-safe database client and ORM
  • NextAuth.js v5 - Comprehensive authentication solution
  • Server Actions - Modern data mutations without API routes

UI & Design System

Content & Editor

  • Plate.js 49 - Rich text editor with plugins
  • Supabase Storage - File upload and management
  • Auto-save System - Real-time content persistence
  • Media Support - Images, videos, and documents

Development & Quality

AI & Integrations

  • Vercel AI SDK - AI integration toolkit
  • OpenAI API - AI-powered features and content generation
  • Resend - Transactional email service

πŸ“‹ Prerequisites

  • Node.js 18+
  • pnpm 8+ (package manager)
  • Git
  • PostgreSQL 13+ (database server)

πŸš€ Quick Start

Automated Setup (Recommended)

# Clone the repository
git clone <repository-url>
cd codac-25

# Run automated setup
pnpm setup

Manual Setup

# Install dependencies
pnpm install

# Setup environment
cp env.template .env

# Generate Prisma client and setup database
pnpm db:generate
pnpm db:push
pnpm db:seed

# Start development server
pnpm dev

πŸ“ Scripts

# Development
pnpm dev              # Start dev server with Turbopack
pnpm dev:safe         # Setup + dev (recommended for first run)

# Building
pnpm build            # Create production build
pnpm start            # Start production server

# Database
pnpm db:generate      # Generate Prisma client
pnpm db:push          # Push schema to database
pnpm db:seed          # Seed database with sample data
pnpm db:studio        # Open Prisma Studio
pnpm db:reset         # Reset database with fresh data

# Code Quality & Testing
pnpm lint             # Run ESLint
pnpm lint:fix         # Fix ESLint issues
pnpm ts:check         # TypeScript type checking
pnpm test:unit        # Run unit tests (Vitest)
pnpm test:unit:watch  # Run unit tests in watch mode
pnpm test:unit:ui     # Interactive unit test debugging
pnpm test             # Run Playwright E2E tests
pnpm test:ui          # Run E2E tests with interactive UI
pnpm test:headed      # Run E2E tests in headed browser mode

# Content Management
pnpm import:lms       # Import LMS content from markdown
pnpm export:docs      # Export documents to markdown

πŸ—οΈ Project Structure

codac-25/
β”œβ”€β”€ app/                   # Next.js app router pages
β”‚   β”œβ”€β”€ auth/              # Authentication pages
β”‚   β”œβ”€β”€ docs/              # Document management
β”‚   β”œβ”€β”€ lms/               # Learning management system
β”‚   β”œβ”€β”€ community/         # Community features
β”‚   β”œβ”€β”€ career/            # Career center
β”‚   └── api/               # API routes
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/                # Reusable UI components
β”‚   β”œβ”€β”€ editor/            # Rich text editor components
β”‚   β”œβ”€β”€ auth/              # Authentication components
β”‚   └── [feature]/         # Feature-specific components
β”œβ”€β”€ lib/                   # Utility libraries
β”œβ”€β”€ actions/               # Server actions
β”œβ”€β”€ data/                  # Data access layer
β”œβ”€β”€ hooks/                 # Custom React hooks
β”œβ”€β”€ types/                 # TypeScript type definitions
β”œβ”€β”€ tests/                 # Test utilities and configuration
└── prisma/                # Database schema and migrations

Authentication & Authorization

  • Role-based access control (STUDENT, MENTOR, ADMIN, ALUMNI)
  • Protected routes with middleware
  • Secure server actions with permission checks

Database Design

  • PostgreSQL with Prisma ORM for development
  • Comprehensive schema covering users, courses, documents, and community features
  • Efficient queries with proper indexing and relations

πŸ§ͺ Testing & Quality Assurance

CODAC includes comprehensive testing infrastructure to ensure reliability and code quality.

Testing Stack

  • Vitest: Fast unit testing with TypeScript support
  • React Testing Library: Component testing utilities
  • Playwright: End-to-end testing with cross-browser support
  • ESLint: Code linting with Next.js and TypeScript rules

Test Types

  • Unit Tests: Functions, components, and server actions (*.test.ts/tsx)
  • Integration Tests: Multi-component workflows and forms
  • E2E Tests: Complete user journeys and accessibility (tests/e2e/)

Running Tests

# Unit Tests
pnpm test:unit        # Run all unit tests
pnpm test:unit:watch  # Watch mode for development

# E2E Tests  
pnpm test             # Run Playwright E2E tests
pnpm test:ui          # Interactive E2E debugging

# Coverage & Reports
pnpm test:unit:coverage  # Unit test coverage
pnpm test:report         # E2E test reports

Development Workflow

  1. Code Quality: Always run pnpm lint and pnpm ts:check before committing
  2. Unit Testing: Write tests for new components and functions (pnpm test:unit:watch)
  3. Database Updates: Use pnpm db:generate after schema changes
  4. Testing: Run relevant tests for your changes
  5. Build Verification: Use pnpm build to ensure production compatibility

πŸ”§ Environment Configuration

Create a .env file in the root directory with the following variables:

Database Configuration

# PostgreSQL Connection (Required)
DATABASE_URL=

Authentication Setup

# NextAuth Configuration (Required)
AUTH_SECRET="your-very-secure-secret-key-minimum-32-characters"
AUTH_URL="http://localhost:3000"

# Google OAuth (Required for full functionality)
AUTH_GOOGLE_ID="your-google-oauth-client-id"
AUTH_GOOGLE_SECRET="your-google-oauth-client-secret"

# Email Provider (Required for magic links)
AUTH_RESEND_KEY="re_your-resend-api-key"
EMAIL_FROM="[email protected]"

🀝 Contributing

We welcome contributions to CODAC! Please follow these steps:

  1. Fork & Clone: Fork the repository and clone your fork
  2. Branch: Create a feature branch (git checkout -b feature/amazing-feature)
  3. Develop: Make your changes following the project conventions
  4. Quality Checks: Run pnpm lint, pnpm ts:check, and relevant tests
  5. Commit: Use conventional commit messages
  6. Push: Push to your branch (git push origin feature/amazing-feature)
  7. Pull Request: Open a PR with a clear description of changes

πŸ“„ License

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

About

codac - Code Academy Berlin community

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages