Skip to content
Mohitverma-code7Public

About

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.

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CampusOne — All-in-One Smart Campus Platform

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.

Features

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

Tech Stack

Backend

  • 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

Frontend

  • 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

Project Structure

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

Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • PostgreSQL 15+
  • Redis 7+
  • Expo CLI
  • Android Studio (for Android builds)

Backend Setup

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 --reload

Frontend Setup

cd 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 --android

Docker Setup

docker-compose up --build

API Documentation

When the backend is running with DEBUG=True, interactive API docs are available at:

Environment Variables

Backend (.env)

Required variables: SECRET_KEY, JWT_SECRET_KEY, DATABASE_URL, DATABASE_URL_SYNC

Frontend (.env)

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.

Security

  • 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)

License

MIT

About

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.

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages