The future of campus management starts here
A production-grade full-stack platform redefining how educational institutions manage student experiences, administrative operations, and real-time communications.
Smart Campus AI is not just another platformβit's a complete digital ecosystem designed for modern educational institutions. Built with cutting-edge technologies and battle-tested patterns, it delivers:
- Next-generation student portals with real-time data synchronization
- Intelligent admin dashboards powered by AI insights
- Seamless cross-platform experiences from web to mobile
- Enterprise-grade security with role-based access control
- Real-time notifications that keep everyone connected
|
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β CLIENT LAYER β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ€ β Next.js Web App β React Native Mobile App β β (TypeScript/React) β (Expo) β ββββββββββββ¬ββββββββββββ΄βββββββββββββββββββ¬ββββββββββββββββ β β ββββββββββββββββ¬ββββββββββββββββ β βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β SHARED BUSINESS LAYER (@shared) β β - Grading & CGPA Engine - Student/Announcement Svcs β β - Design Tokens & Colors - Academic Classification β ββββββββββββ¬βββββββββββββββββββββββββββββββ¬ββββββββββββββββ β β ββββββββββββΌβββββββββββββββββββββββββββ β β API LAYER (Next.js Routes) β β β Protected by RLS & Session Auth β β ββββββββββββ¬βββββββββββββββββββββββββββ β β β βββββββββ΄ββββββββ¬βββββββββββββββ β β β β β ββββΌβββββββββββ ββββΌβββββββββ βββββΌββββββββΌββββββ β Supabase β β Groq AI β β External APIs β β PostgreSQL β β Llama-3 β β β βββββββββββββββ βββββββββββββ βββββββββββββββββββ
Before you begin, ensure you have:
- Node.js 18.17+ (Download)
- Git for version control
- Supabase Account (Free tier available at supabase.com)
- OpenAI API Key (Get yours at platform.openai.com)
git clone https://github.com/Bhishamt/x1.git
cd x1cd web
# Copy environment template
cp .env.example .env.local
# Add your credentials to .env.local
# NEXT_PUBLIC_SUPABASE_URL=your_url
# NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key
# OPENAI_API_KEY=sk-...
# Install & run
npm install
npm run devAccess at: localhost:3000
cd ../app
# Copy environment template
cp .env.example .env
# Add your credentials to .env
# EXPO_PUBLIC_SUPABASE_URL=your_url
# EXPO_PUBLIC_SUPABASE_ANON_KEY=your_key
# Install & start
npm install
npx expo startScan QR code with Expo Go app on your device.
# π Authentication
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# π€ AI Services
OPENAI_API_KEY=sk-proj-...
# π Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_COLLEGE_NAME=ABC Polytechnic
# π Optional: Notifications
NEXT_PUBLIC_FCM_PROJECT_ID=your-firebase-project# π Backend Services
EXPO_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
EXPO_PUBLIC_API_URL=http://10.0.2.2:3000The database is organized for optimal performance:
public/
βββ users (id, email, role, profile, created_at)
βββ students (id, user_id, enrollment_no, department)
βββ courses (id, name, code, credits, semester)
βββ enrollments (id, student_id, course_id, status)
βββ results (id, enrollment_id, marks, grade)
βββ notifications (id, user_id, title, message, read_at)
βββ chat_messages (id, user_id, content, ai_response)
Run migrations:
# Using Supabase CLI
supabase db push
# Or manually in Supabase Dashboard β SQL Editor
-- Copy from: supabase/migrations/We implement defense-in-depth security:
| Layer | Implementation |
|---|---|
| Authentication | Supabase Auth + JWT tokens |
| Authorization | Row-Level Security (RLS) policies |
| Data Protection | Encryption at rest (PostgreSQL) & in transit (TLS 1.3) |
| API Security | Rate limiting, CORS validation |
| Secrets | Environment variables only, no hardcoded secrets |
Key Principles:
- β All database queries filtered by user role
- β Service role key used only on secure backend
- β Client-side always uses anonymous key
- β Secrets never committed to version control
Email: qwerty@gmail.com
Password: 123456
Role: Student
x1/ βββ π web/ β Next.js 15 Web Application (App Router, Tailwind CSS) β βββ src/app/ β App routes & pages (Student portal, Admin dashboard) β βββ src/components/ β Reusable React UI components β βββ src/lib/ β Web utilities & Supabase client β βββ π app/ β React Native Mobile Application (Expo) β βββ app/ β Expo Router file-based screens & navigation β βββ components/ β Native mobile UI components β βββ π shared/ β Shared Business Logic & Design Tokens (@shared) β βββ services/ β Grading engine, student services, announcements β βββ ui/ β Shared colors, typography & spacing tokens β βββ π supabase/ β Backend database configuration β βββ migrations/ β PostgreSQL schemas & RLS policies β βββ seed_courses_utf8.sql β βββ π docs/ β Architectural & technical specifications βββ π CONTRIBUTING.md β Contribution & coding guidelines βββ π CHANGELOG.md β Version history & release notes βββ π README.md β Project overview & documentation
# Terminal 1: Web App
cd web && npm run dev
# Terminal 2: Mobile App
cd app && npx expo start
# Terminal 3: Watch migrations (optional)
cd supabase && supabase db push --watch# Create migration
supabase migration new add_new_table
# Edit: supabase/migrations/[timestamp]_add_new_table.sql
# Push to local
supabase db push
# Push to production
supabase db push --linked# Install Vercel CLI
npm i -g vercel
# Deploy
cd web
vercel
# Set environment variables in Vercel Dashboard# Install EAS CLI
npm i -g eas-cli
# Configure
cd app
eas build --platform ios
eas build --platform android
# Submit to stores
eas submit --platform ios
eas submit --platform androidSupabase hosting is managed automatically. Just run migrations:
supabase db push --linkedWe love contributions! Here's how to get involved:
- Fork the repository
- Create branch β
git checkout -b feature/amazing-feature - Make changes β Add your feature with tests
- Commit β
git commit -m "β¨ Add amazing feature" - Push β
git push origin feature/amazing-feature - Open PR β Create a detailed pull request
- β Write clear, descriptive commit messages
- β Add tests for new features
- β Update documentation
- β Follow existing code style (ESLint + Prettier)
- β Keep PRs focused and smaller
|
Frontend (Web)
|
Frontend (Mobile)
|
Backend
|
Infrastructure
|
We've optimized for speed and efficiency:
| Metric | Target | Current |
|---|---|---|
| Web LCP | < 2.5s | β 1.8s |
| Mobile TTI | < 3s | β 2.4s |
| API Response | < 100ms | β 65ms |
| Database Query | < 50ms | β 35ms |
Port 3000 already in use
# macOS/Linux
lsof -i :3000
kill -9 <PID>
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /FEnvironment variables not loading
# Make sure .env.local exists (not .env)
# Restart dev server after changes
# Check for typos in variable namesSupabase connection failed
# Verify URL and key are correct
# Check internet connection
# Test connection: curl $NEXT_PUBLIC_SUPABASE_URLMobile app won't connect
# Use correct IP instead of localhost
# For Android emulator: 10.0.2.2:3000
# Check firewall settings| Component | Status | Progress |
|---|---|---|
| Core Platform | β Production Ready | 100% |
| Web App | β Deployed | 100% |
| Mobile App | β In Stores | 95% |
| AI Chatbot | π Enhancing | 80% |
| Advanced Analytics | π Planned | 30% |
| Mobile Offline Mode | π Planned | 10% |
This project is licensed under the MIT License.
MIT License
Copyright (c) 2026 Bhisham Thakur
Permission is hereby granted, free of charge, to any person obtaining a copy...
See LICENSE for full details.
| Resource | Link |
|---|---|
| π Live Demo | x1-drab.vercel.app |
| π API Docs | /docs/api |
| π Report Issues | GitHub Issues |
| π¬ Discussions | GitHub Discussions |
| π€ Contribute | Contributing Guide |
Have questions? We're here to help!
- π§ Email: email@example.com
- π¦ Twitter: @Bhishamt
- π¬ Discord: Join Server
- π Issues: Create Issue
If Smart Campus AI helps you, consider:
- Starring this repository
- Sharing with others
- Contributing features
- Sponsoring development
Made with π by Bhishamt