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.
- 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
- 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
- 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
- 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
- Project Matching: Find peers working on the same project
- Campus Filtering: Filter by your campus
- Auto-refresh: Automatically updates available peers
- 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
- Rate Peers: Provide feedback on evaluations
- Badge System: Earn badges for quality feedback
- Categories: Top Feedback, Innovative, Critical Thinker, Helpful, Contributor
- Framework: Next.js 15.3.4 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- Icons: React Icons
- State Management: React Context API
- Runtime: Node.js
- Database: PostgreSQL
- ORM: pg (node-postgres)
- Authentication: JWT with jose library
- API: 42 Intra API (OAuth 2.0)
- Node.js 18+ and npm
- PostgreSQL 12+
- 42 API credentials (OAuth app)
- Clone the repository
git clone https://github.com/Mohammed-Maghri/The-Official-New-Leets.git
cd The-Official-New-Leets- Install dependencies
npm install- 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- 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- Run the development server
npm run devOpen http://localhost:3000 in your browser.
- Build for production
npm run build
npm startThe-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
- User clicks "Login with 42"
- Redirected to 42 OAuth page
- User authorizes the app
- 42 redirects back with authorization code
- App exchanges code for access token
- Token encrypted and stored in JWT
- JWT stored in HTTP-only cookie
- Shared across all routes
- Batch fetching (50 users/request)
- Reduces API calls by ~50%
- Shared globally across users
- Graceful degradation on API errors
- 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
- Limit: 20 requests per minute (1200/hour)
- Scope: Per user session
- Presets:
- STRICT: 20/min
- MODERATE: 30/min
- LENIENT: 50/min
- 42 API Downtime: Graceful fallback to empty results
- Network Errors: User-friendly error messages
- Loading States: Clear feedback on all async operations
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari, Chrome Mobile)
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is private and proprietary. All rights reserved.
Mohammed Maghri (mmaghri)
- 42 Intra: @mmaghri
- GitHub: @Mohammed-Maghri
- 42 Network for the API
- All contributors and testers
- The 42 community
- Build Time: ~11 seconds
- Initial Load: < 3 seconds
- API Response: < 2 seconds (cached)
- Capacity: 109 users/hour with caching
- Cache Hit Rate: ~60% average
- 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