Skip to content

Repository files navigation

NexSync AI

AI-Powered College Management Platform
A comprehensive React Native (Expo) mobile application for college students, featuring intelligent event booking, venue management, and travel coordination powered by Google Gemini AI.


πŸš€ Features

πŸ“… EventSync Module

  • AI Event Extraction: Describe your event in natural language β†’ AI extracts details
  • Smart Venue Booking: Automatically find available venues matching your requirements
  • Admin Approval Workflow: Secure request-review-approve system
  • Google Calendar Integration: Sync approved events automatically
  • Real-time Availability: Check venue occupancy and time slot conflicts

πŸš— TravelSync Module (Coming Soon)

  • Carpooling coordination for college events
  • Travel route optimization
  • Real-time ride matching

πŸ› οΈ Tech Stack

  • Frontend: React Native (Expo Router)
  • Backend: Express.js (Local) + Firebase Functions (Cloud)
  • Database: Firebase Firestore
  • AI: Google Gemini 1.5 Flash
  • Calendar: Google Calendar API
  • Authentication: Firebase Auth (SECE Email Only)
  • Language: TypeScript

πŸ“‹ Prerequisites

  • Node.js 18+ and npm
  • Expo CLI
  • Firebase Account
  • Google Cloud Account (for Gemini AI & Calendar API)

⚑ Quick Start

1. Clone Repository

git clone https://github.com/yourusername/NexSync.git
cd NexSync

2. Install Dependencies

# Frontend
npm install

# Backend
cd backend/local
npm install
cd ../..

3. Configure Environment Variables

Frontend - Create NexSync/.env:

EXPO_PUBLIC_API_URL=http://localhost:5000
EXPO_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
EXPO_PUBLIC_FIREBASE_APP_ID=your-app-id

Backend - Create backend/local/.env:

PORT=5000
NODE_ENV=development
FIREBASE_PROJECT_ID=your-project-id
GEMINI_API_KEY=your-gemini-api-key
GOOGLE_CALENDAR_ID=primary
ALLOWED_ORIGINS=http://localhost:8081,http://localhost:19000

Firebase Service Account:

  • Download serviceAccountKey.json from Firebase Console
  • Place in backend/functions/serviceAccountKey.json

4. Seed Database

cd backend/local
npm run seed:venues  # Creates 10 sample venues
npm run seed:admins  # Creates 10 admin users

5. Run Application

Terminal 1 - Backend:

cd backend/local
npm start

Terminal 2 - Frontend:

npm start

Access: Open Expo app on your phone or press w for web browser.


πŸ“ Project Structure

NexSync/
β”œβ”€β”€ app/                    # Expo Router screens
β”‚   β”œβ”€β”€ (auth)/            # Login/Signup
β”‚   β”œβ”€β”€ (tabs)/            # Main app tabs
β”‚   β”œβ”€β”€ (eventsync)/       # EventSync module
β”‚   └── (onboarding)/      # Welcome tour
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/        # Reusable UI components
β”‚   β”œβ”€β”€ services/          # API & Firebase services
β”‚   β”œβ”€β”€ constants/         # Theme & config
β”‚   └── types/             # TypeScript types
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ local/             # Express server (development)
β”‚   β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   β”‚   β”œβ”€β”€ controllers/   # Business logic
β”‚   β”‚   β”œβ”€β”€ services/      # External services
β”‚   β”‚   └── scripts/       # Seed scripts
β”‚   └── functions/         # Firebase Functions (production)
└── assets/                # Images, fonts, icons

πŸ” Security

  • Email Restriction: Only @sece.ac.in emails allowed
  • JWT Authentication: Firebase ID tokens
  • Admin Role Check: Middleware protection
  • Environment Variables: All secrets in .env (gitignored)
  • Service Account: Secure Firebase Admin SDK

πŸ“± Features in Detail

EventSync Workflow

  1. User Input: "Need a computer lab for 50 students tomorrow at 2 PM"
  2. AI Processing: Gemini AI extracts event details
  3. Venue Search: Backend finds available venues
  4. Selection: User picks venue or gets AI alternatives
  5. Submission: Request sent for admin approval
  6. Approval: Admin reviews and approves
  7. Calendar Sync: Auto-sync to Google Calendar

Admin Features

  • View all pending requests
  • Approve/reject with one click
  • Atomic venue slot allocation
  • Conflict detection

πŸ§ͺ Testing

Backend Health Check

curl http://localhost:5000/health

API Test (with auth token)

curl -X POST http://localhost:5000/api/events/extract \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"userText":"Need lab for 50 students tomorrow"}'

πŸ“š API Documentation

See backend/local/README.md for complete API reference.

Key Endpoints:

  • POST /api/events/extract - AI event extraction
  • POST /api/events/findAvailable - Find venues
  • POST /api/events/submitRequest - Submit for approval
  • POST /api/admin/approve - Approve request
  • POST /api/events/syncCalendar - Google Calendar sync

🀝 Contributing

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

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘₯ Team

Developed for GDG Hackathon 2026


πŸ™ Acknowledgments

  • Google Gemini AI
  • Firebase Platform
  • Expo Framework
  • React Native Community

πŸ“ž Support

For issues or questions:


Built with ❀️ for SECE Students

About

Smart campus resource management with AI-powered scheduling, venue booking, and intelligent conflict detection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages