Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ StudyFlow Pro

A full-stack academic productivity platform for university students โ€” manage courses, assignments, quizzes, exams, notes, and study sessions in one intelligent dashboard.

Next.js Express PostgreSQL Prisma TypeScript Tailwind CSS

โœจ Features

  • ๐Ÿ” JWT Authentication โ€” Register, login, refresh tokens, change password
  • ๐Ÿ“š Course Management โ€” Create/edit/delete courses with custom colors
  • โœ… Task Tracking โ€” Full CRUD for assignments, quizzes, exams, projects with priority/status/difficulty
  • ๐Ÿ“… Calendar View โ€” Monthly calendar with task deadlines displayed per day
  • ๐Ÿ“ Notes Module โ€” Create and edit notes linked to courses/tasks
  • ๐Ÿ“Š Analytics Dashboard โ€” Weekly charts, course progress bars, study hours
  • โšก Smart Recommendation Engine โ€” Ranks tasks by urgency + difficulty, suggests what to study today
  • ๐ŸŒ™ Dark Mode โ€” Toggle light/dark theme, persisted across sessions
  • ๐Ÿ” Filter & Search โ€” Filter tasks by course, type, status, priority

๐Ÿ›  Tech Stack

Layer Technology
Frontend Next.js 14 (App Router), Tailwind CSS, Recharts, Zustand, Lucide
Backend Node.js, Express.js, TypeScript
Database PostgreSQL + Prisma ORM
Auth JWT (access + refresh tokens), bcrypt
Deploy Vercel (frontend) + Railway (backend + DB)

๐Ÿ“ Project Structure

studyflow-pro/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ prisma/schema.prisma          # Database schema
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ config/                   # env, database
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/              # auth, courses, tasks, notes, sessions, analytics
โ”‚   โ”‚   โ”œโ”€โ”€ middlewares/              # authenticate, validate, errorHandler
โ”‚   โ”‚   โ”œโ”€โ”€ routes/                   # all route files
โ”‚   โ”‚   โ”œโ”€โ”€ utils/                    # response helpers, seed
โ”‚   โ”‚   โ””โ”€โ”€ server.ts                 # Express app entry
โ”‚   โ””โ”€โ”€ package.json
โ””โ”€โ”€ frontend/
    โ””โ”€โ”€ src/
        โ”œโ”€โ”€ app/
        โ”‚   โ”œโ”€โ”€ (auth)/login + register
        โ”‚   โ””โ”€โ”€ (dashboard)/dashboard, courses, tasks, calendar, notes, analytics, settings
        โ”œโ”€โ”€ components/layout, courses, tasks, notes
        โ”œโ”€โ”€ hooks/                    # useAuth, useTasks, useCourses, useNotes
        โ”œโ”€โ”€ lib/                      # api.ts (Axios), utils.ts
        โ”œโ”€โ”€ store/                    # Zustand authStore, uiStore
        โ””โ”€โ”€ types/                    # TypeScript interfaces

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • npm or yarn

1. Clone & install

git clone https://github.com/yourusername/studyflow-pro
cd studyflow-pro

# Install backend deps
cd backend && npm install

# Install frontend deps
cd ../frontend && npm install

2. Setup backend environment

cd backend
cp .env.example .env
# Edit .env โ€” set DATABASE_URL and JWT secrets

3. Setup database

cd backend
npx prisma migrate dev --name init
npx prisma generate
npm run db:seed    # Optional: loads demo data

4. Setup frontend environment

cd frontend
cp .env.local.example .env.local
# Edit .env.local โ€” set NEXT_PUBLIC_API_URL

5. Run development servers

# Terminal 1 โ€” Backend
cd backend && npm run dev

# Terminal 2 โ€” Frontend
cd frontend && npm run dev

Demo Credentials

After seeding:

๐Ÿ“ก API Reference

Auth

Method Endpoint Description
POST /api/auth/register Create account
POST /api/auth/login Sign in
POST /api/auth/refresh Refresh tokens
POST /api/auth/logout Sign out
GET /api/auth/me Get profile
PUT /api/auth/profile Update profile
PUT /api/auth/change-password Change password

Courses

Method Endpoint Description
GET /api/courses List all courses
POST /api/courses Create course
PUT /api/courses/:id Update course
DELETE /api/courses/:id Delete course

Tasks

Method Endpoint Description
GET /api/tasks List tasks (filterable)
GET /api/tasks/today Tasks due today
GET /api/tasks/overdue Overdue tasks
POST /api/tasks Create task
PUT /api/tasks/:id Update task
DELETE /api/tasks/:id Delete task

Analytics

Method Endpoint Description
GET /api/analytics/dashboard Summary stats
GET /api/analytics/weekly 7-day progress
GET /api/analytics/courses Per-course progress
GET /api/analytics/recommendations Smart task suggestions

๐Ÿ—„ Database Schema

Users โ”€โ”€< Courses โ”€โ”€< Tasks
Users โ”€โ”€< Notes  โ”€โ”€> Courses (optional)
Users โ”€โ”€< StudySessions โ”€โ”€> Tasks (optional)
Tasks โ”€โ”€< StudySessions
Tasks โ”€โ”€< Notes
RefreshTokens โ”€โ”€> Users

๐Ÿšข Deployment

Frontend โ†’ Vercel

cd frontend
npx vercel --prod
# Set NEXT_PUBLIC_API_URL to your Railway backend URL


Demo login after seeding: demo@studyflow.pro / password123

Backend โ†’ Railway

  1. Push to GitHub
  2. Connect repo to Railway
  3. Set all env variables from .env.example
  4. Railway auto-detects Node.js and runs npm start

๐Ÿ”ฎ Future Improvements

  • Pomodoro timer linked to tasks
  • AI study tips via Claude API
  • Browser push notifications for deadlines
  • Google Calendar / iCal sync
  • PDF export for schedules
  • Collaborative study groups
  • Spaced repetition flashcards from notes
  • Mobile app (React Native)

cd backend npm run dev

cd frontend npm run dev

๐Ÿ‘ค Author

Built by Achraf Nazha โ€” GitHub ยท LinkedIn


โญ Star this repo if you found it helpful!

About

A full-stack academic productivity platform for managing courses, tasks, exams, notes, and study schedules.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages