Skip to content

About

(Production) The New Updated Version of the Student Rank-Board Platform for 42-Network , lets users view their live rankings and cursus progress in real time. Built with: Next.js (Full Stack, TypeScript) | Backend powered by API routes & edge functions Live : www.1337leets.com

Resources

Stars

34 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

146 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ The Official New Leets

A modern, feature-rich platform for 42 Network students built with Next.js 15, TypeScript, and PostgreSQL. Features real-time ranking by cursus and campus, with a distinctive pixelated aesthetic throughout the UI.

Next.js TypeScript PostgreSQL Tailwind CSS

โœจ Features

๐Ÿ“Š Progress Tracking

  • Real-time Rankings: View student rankings by cursus and campus
  • Level Progression: Track your level and compare with peers
  • Campus Filtering: Filter by 30+ global 42 campuses
  • Monthly/Yearly Views: Switch between pool months and academic years
  • Custom Badges: VIP, Creator, and Feedback badges system

๐Ÿ‘ฅ Teams & Collaboration

  • Team Browser: Explore teams across all projects
  • Project Filtering: Filter by specific projects or categories
  • Date Filters: View teams from today, yesterday, or custom dates
  • Member Profiles: Direct links to 42 intra profiles
  • Advanced Search: Search by username or project name

๐Ÿ“ Evaluations

  • Evaluation History: Browse all evaluations by date and campus
  • Pass/Fail Filtering: Quick filters for passed/failed evaluations
  • Score Display: View detailed scores and feedback
  • Profile Integration: Quick access to corrector/corrected profiles
  • Real-time Updates: Live evaluation data from 42 API

๐Ÿ’ผ CV Maker

  • Auto-populated Data: Automatically fetches your 42 data
  • Project Showcase: Displays validated projects with scores
  • Skills Display: Shows your technical skills from cursus
  • Professional Layout: Clean, print-ready CV format
  • Edit Mode: Customize your information before exporting
  • PDF Export: Download your CV with one click

๐Ÿ“ฑ Peer Finder

  • Project Matching: Find peers working on the same project
  • Campus Filtering: Filter by your campus
  • Auto-refresh: Automatically updates available peers

๐Ÿ”” Notifications

  • Real-time Alerts: Instant notifications for important updates
  • User-specific: Targeted notifications or broadcast to all
  • Mark as Read: Track which notifications you've seen

๐ŸŽฏ Feedback System

  • Rate Peers: Provide feedback on evaluations
  • Badge System: Earn badges for quality feedback
  • Categories: Top Feedback, Innovative, Critical Thinker, Helpful, Contributor

๐Ÿš€ Tech Stack

Frontend

  • Framework: Next.js 15.3.4 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Animations: Framer Motion
  • Icons: React Icons
  • State Management: React Context API

Backend

  • Runtime: Node.js
  • Database: PostgreSQL
  • ORM: pg (node-postgres)
  • Authentication: JWT with jose library
  • API: 42 Intra API (OAuth 2.0)

Prerequisites

  • Node.js 18+ and npm
  • PostgreSQL 12+
  • 42 API credentials (OAuth app)

Setup

  1. Clone the repository
git clone https://github.com/Mohammed-Maghri/The-Official-New-Leets.git
cd The-Official-New-Leets
  1. Install dependencies
npm install
  1. Environment Variables

Create a .env.local file in the root directory:

# 42 API
INTRA_TOKEN=https://api.intra.42.fr
CLIENT_ID=your_42_client_id
CLIENT_SECRET=your_42_client_secret
REDIRECT_URI=http://localhost:3000/api/auth

# Database
DATABASE_KEY=postgresql://username:password@localhost:5432/database_name

# JWT
SECRET_KEY=your_jwt_secret_key

# App
NEXT_PUBLIC_API_URL=http://localhost:3000
  1. Database Setup

Run the SQL files in src/app/api/database/:

psql -U username -d database_name -f src/app/api/database/chat.sql
psql -U username -d database_name -f src/app/api/database/notifications.sql
psql -U username -d database_name -f src/app/api/database/chat_reactions.sql
# ... etc
  1. Run the development server
npm run dev

Open http://localhost:3000 in your browser.

  1. Build for production
npm run build
npm start

๐Ÿ—‚๏ธ Project Structure

The-Official-New-Leets/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/                 # API routes
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth/           # Authentication
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ chat/           # Chat endpoints
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ evaluations/    # Evaluations data
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ progress/       # Rankings & progress
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ slots/          # Teams data
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ notifications/  # Notifications
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ cv-maker/       # CV generation
โ”‚   โ”‚   โ”œโ”€โ”€ calculator/         # Grade calculator
โ”‚   โ”‚   โ”œโ”€โ”€ chat/              # Chat interface
โ”‚   โ”‚   โ”œโ”€โ”€ cv-maker/          # CV builder UI
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/         # User dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ evaluations/       # Evaluations browser
โ”‚   โ”‚   โ”œโ”€โ”€ peerfinder/        # Peer finder
โ”‚   โ”‚   โ”œโ”€โ”€ progress/          # Rankings page
โ”‚   โ”‚   โ”œโ”€โ”€ teams/             # Teams browser
โ”‚   โ”‚   โ””โ”€โ”€ vip/               # VIP management
โ”‚   โ”œโ”€โ”€ component/
โ”‚   โ”‚   โ”œโ”€โ”€ badges/            # Badge components
โ”‚   โ”‚   โ”œโ”€โ”€ context/           # React Context
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/         # Dashboard components
โ”‚   โ”‚   โ”œโ”€โ”€ feedback/          # Feedback system
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/             # Custom React hooks
โ”‚   โ”‚   โ””โ”€โ”€ navbar/            # Navigation
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ moderationUtils.ts # Chat moderation
โ”‚       โ””โ”€โ”€ rateLimit.ts       # Rate limiting
โ”œโ”€โ”€ public/                    # Static assets
โ”œโ”€โ”€ pages/api/                # Pages API (WebSocket)
โ””โ”€โ”€ scripts/                  # Utility scripts

๐Ÿ” Authentication Flow

  1. User clicks "Login with 42"
  2. Redirected to 42 OAuth page
  3. User authorizes the app
  4. 42 redirects back with authorization code
  5. App exchanges code for access token
  6. Token encrypted and stored in JWT
  7. JWT stored in HTTP-only cookie

๐Ÿ’พ Caching Strategy

Profile Pictures (1 hour TTL)

  • Shared across all routes
  • Batch fetching (50 users/request)
  • Reduces API calls by ~50%

Progress Data (20 minutes TTL)

  • Shared globally across users

Evaluations (20 minutes TTL)

  • Graceful degradation on API errors

๐ŸŽจ Design System

  • Pixelated Vibe: Retro pixel-style UI with chunky borders, pixel fonts, and a nostalgic gaming aesthetic
  • Color Scheme: Dark theme with blue accents (#0070ef)
  • Typography: Tektur font for headings, pixel fonts for UI elements
  • Glassmorphism: Backdrop blur effects throughout
  • Responsive: Mobile-first design
  • Animations: Smooth transitions with Framer Motion

๐Ÿ”ง API Rate Limiting

  • Limit: 20 requests per minute (1200/hour)
  • Scope: Per user session
  • Presets:
    • STRICT: 20/min
    • MODERATE: 30/min
    • LENIENT: 50/min

๐Ÿ› Error Handling

  • 42 API Downtime: Graceful fallback to empty results
  • Network Errors: User-friendly error messages
  • Loading States: Clear feedback on all async operations

๐Ÿ“ฑ Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+
  • Mobile browsers (iOS Safari, Chrome Mobile)

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is private and proprietary. All rights reserved.

๐Ÿ‘จโ€๐Ÿ’ป Author

Mohammed Maghri (mmaghri)

๐Ÿ™ Acknowledgments

  • 42 Network for the API
  • All contributors and testers
  • The 42 community

๐Ÿ“Š Performance Metrics

  • Build Time: ~11 seconds
  • Initial Load: < 3 seconds
  • API Response: < 2 seconds (cached)
  • Capacity: 109 users/hour with caching
  • Cache Hit Rate: ~60% average

๐Ÿ”ฎ Roadmap

  • Database caching (Redis)
  • Email notifications
  • Advanced analytics dashboard
  • Mobile app (React Native)
  • Multi-language support
  • Dark/Light theme toggle
  • Export data to Excel/CSV

Made with โค๏ธ for the 42 Network community

About

(Production) The New Updated Version of the Student Rank-Board Platform for 42-Network , lets users view their live rankings and cursus progress in real time. Built with: Next.js (Full Stack, TypeScript) | Backend powered by API routes & edge functions Live : www.1337leets.com

Resources

Stars

34 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages