CampusOne is a full-stack mobile application that unifies all campus services into a single platform. Built with FastAPI (backend) and React Native / Expo (frontend), it serves students, faculty, administrators, and security personnel.
| Module | Description |
|---|---|
| Authentication | Email/password login, Google OAuth, account lockout protection, refresh token rotation |
| Complaints | Submit, track, assign, and resolve campus complaints with AI-powered categorization |
| Lost & Found | Report lost/found items with AI-powered matching |
| Attendance | QR code & NFC-based attendance marking with geofencing |
| Timetable | View and manage class schedules |
| Events | Browse upcoming events, register, QR check-in |
| Notices | Campus-wide and department-specific announcements |
| Emergency | Real-time emergency alerts with push notifications |
| Digital ID | QR-based digital identity card for verification |
| Room Booking | Book seminar halls, labs, and conference rooms |
| Marketplace | Buy/sell items within the campus community |
| Placements | Placement drive management, applications, and resume parsing |
| Notifications | Push notifications via FCM |
| Admin Dashboard | User management, department management, analytics |
| Chatbot | AI-powered campus assistant |
- FastAPI — async Python web framework
- SQLAlchemy — async ORM with PostgreSQL
- Redis — caching and rate limiting
- PostgreSQL — primary database
- JWT — authentication with access/refresh tokens
- bcrypt — password hashing
- Docker — containerized deployment
- React Native 0.74 — cross-platform mobile
- Expo SDK 51 — managed React Native workflow
- TypeScript — type-safe development
- Axios — HTTP client with interceptors
- Zustand — state management
- SecureStore — secure token storage
CampusOne/
├── backend/
│ ├── app/
│ │ ├── api/ # API routes and dependencies
│ │ │ ├── v1/
│ │ │ │ └── endpoints/
│ │ │ └── deps.py
│ │ ├── core/ # Configuration, security, middleware
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── schemas/ # Pydantic request/response schemas
│ │ └── services/ # Business logic
│ ├── Dockerfile
│ ├── requirements.txt
│ └── .env
├── frontend/
│ ├── src/
│ │ ├── screens/ # React Native screens
│ │ ├── services/ # API client, error handling
│ │ ├── store/ # Zustand state stores
│ │ ├── navigation/ # React Navigation
│ │ └── types/ # TypeScript type declarations
│ ├── android/ # Native Android project
│ ├── App.tsx
│ └── .env
├── docker-compose.yml
├── .gitignore
└── README.md
- Python 3.11+
- Node.js 18+
- PostgreSQL 15+
- Redis 7+
- Expo CLI
- Android Studio (for Android builds)
cd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
# Configure .env (copy from .env.example)
cp .env.example .env
# Start development server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadcd frontend
npm install
# Configure .env
# Set EXPO_PUBLIC_API_URL to your backend URL
# e.g., http://192.168.1.42:8000/api/v1
# Start Expo development server
npx expo start
# Run on Android
npx expo start --androiddocker-compose up --buildWhen the backend is running with DEBUG=True, interactive API docs are available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Required variables: SECRET_KEY, JWT_SECRET_KEY, DATABASE_URL, DATABASE_URL_SYNC
Required: EXPO_PUBLIC_API_URL — the backend base URL (e.g., http://192.168.1.42:8000/api/v1)
Important: Do NOT wrap values in quotes — Expo loads .env values literally.
- Passwords hashed with bcrypt (12 rounds)
- JWT access tokens (30 min) + refresh tokens (7 days) with rotation
- Rate limiting on auth endpoints (10 req/min)
- Account lockout after 5 failed attempts
- Password history enforcement (no reuse of last 5)
- CORS restricted to allowed origins
- Security headers (XSS, X-Frame, HSTS)
MIT