UniFlow
Project Overview
UniFlow is a university academic management platform with a React Native Expo frontend and an Express + Prisma backend. It supports student and teacher workflows for authentication, timetable access, resource sharing, result lookup, and AI-powered academic assistance.
Architecture
backend/: Node.js API server using Express.frontend/: Expo React Native app built with Expo Router.backend/prisma/schema.prisma: PostgreSQL data model definitions.frontend/utils/supabase.ts: Supabase client configuration for authentication and session management.
Key Features
Authentication
- Sign up and login through backend auth routes.
- Uses Supabase auth for user sessions.
- User roles:
STUDENT,TEACHER,ADMIN.
Student Features
- View timetable by degree, semester, and section.
- Access student-specific resources.
- Chat with AI assistant for study, timetable, and GPA guidance.
- Retrieve exam results using external LMS API.
Teacher Features
- Upload resources to Cloudinary and make them available to students.
- View personal timetable.
- Upload Excel timetable files that are parsed and imported into the database.
Admin Features
- Admin dashboard layout for system overview and management actions.
AI Assistant
- Backend chat integration using Groq OpenAI-compatible API.
- Stores chat history in Prisma.
- Provides contextual responses based on user timetable and resources.
Backend
Stack
- Node.js
- Express
- Prisma ORM
- PostgreSQL
- Supabase Auth
- Cloudinary
- Axios
- Multer
- XLSX
Important Backend Files
backend/index.js: App entrypoint and route registration.backend/src/routes/*: API route definitions.backend/src/controllers/*: Business logic for auth, timetables, resources, results, and AI.backend/src/config/*: Prisma, Supabase, and Cloudinary configuration.backend/prisma/schema.prisma: Database models.
Backend API Endpoints
POST /api/auth/signupPOST /api/auth/loginPOST /api/timetable/uploadGET /api/timetable/studentGET /api/timetable/teacherGET /api/timetable/allGET /api/timetable/teacher/todayGET /api/results/studentPOST /api/resources/uploadGET /api/resources/teacherGET /api/resources/studentGET /api/resources/teacher/countPOST /api/ai/chatGET /api/ai/chat-history
Frontend
Stack
- Expo
- React Native
- Expo Router
- Supabase JS
- Zustand
- Expo Vector Icons
- React Navigation
Notable Frontend Pages
- Authentication flow:
frontend/app/(auth)/login.tsx,frontend/app/(auth)/signup.tsx - Student dashboard and timetable:
frontend/app/(app)/student/timetable.tsx - AI assistant:
frontend/app/(app)/student/ai.tsx - Teacher upload:
frontend/app/(app)/teacher/upload.tsx - Admin dashboard:
frontend/app/(app)/admin/index.tsx
Setup
Backend
- Navigate to
backend/ - Install dependencies:
npm install
- Create a
.envfile with the required variables:DATABASE_URLSUPABASE_URLSUPABASE_KEYCLOUDINARY_NAMECLOUDINARY_KEYCLOUDINARY_SECRETGROQ_API_KEYUAF_API_KEY
- Start the server:
npm run dev
Frontend
- Navigate to
frontend/ - Install dependencies:
npm install
- Ensure
frontend/utils/config.tspoints to the correct backend URL:BACKEND_URL = "http://<your-backend-host>:5000"
- Start Expo:
npm start
Notes
- The frontend currently uses hardcoded Supabase credentials in
frontend/utils/supabase.ts; replace these with environment-safe values before production. - The timetable upload expects an Excel workbook with days, rooms, and time slots in the first rows.
- AI chat requires
GROQ_API_KEYfor the Groq OpenAI-compatible endpoint. - Results lookup uses
UAF_API_KEYfor the external LMS API.
Development Tips
- Use the backend
nodemondev script for live reloading. - Update
frontend/utils/config.tsif the backend address changes. - Review Prisma schema before running migrations.
Contact
This README was generated from the UniFlow project source structure. Update it with project-specific details as needed.
Log in or sign up for Devpost to join the conversation.