Smart Assignment Manager is a TypeScript based, role-based assignment management system built with Next.js (App Router), NextAuth, and Prisma with PostgreSQL.
The application implements full CRUD operations for assignments and submissions, allowing:
- Teachers to create, read, update, and delete assignments
- Students to view assignments, submit work, and track their submissions
The application allows:
- Teachers to create, manage, and grade assignments
- Students to view assignments and submit their work
- Credentials-based authentication using NextAuth
- JWT-based session handling
- Secure password hashing
- Role-based access control (TEACHER / STUDENT)
- Create new assignments
- Edit existing assignments
- View student submissions
- Grade submissions
- Teacher dashboard with statistics
- View available assignments
- Submit assignments
- View submission status and grades
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Authentication: Auth.js (NextAuth v5)
- Database: PostgreSQL (Neon) with Prisma ORM
- Styling & UI Components: Tailwind CSS, shadcn/ui
- Package Manager: pnpm
app/
├─ (auth)/login # Authentication pages
├─ (dashboards)/
│ ├─ student/ # Student dashboard
│ └─ teacher/ # Teacher dashboard
├─ api/ # Backend route handlers
├─ components/ # Shared UI components
├─ features/ # Feature-based services & logic
├─ lib/ # Prisma client & utilities
├─ prisma/ # Prisma schema, migrations, seed
├─ types/ # Global & NextAuth types
- Clone the repository
git clone [email protected]:Jithin7777/Smart-Assignment-Manager.git
cd smart-assignment-manager- Install dependencies
pnpm install- Setup environment variables Create a .env file in the project root.
# Database
DATABASE_URL="your-neon-postgresql-connection-string"
AUTH_URL=http://localhost:3000
# Generate with: pnpm dlx auth secret
AUTH_SECRET="replace-with-your-generated-secret"- Setup the database (Prisma)
pnpm prisma generate
pnpm prisma migrate dev
pnpm prisma db seed- Start the development server
pnpm devTeacher:
Email: [email protected]
Password: teacher123
Student:
Email: [email protected]
Password: student123
- Feature-based folder structure for scalability
- Server Components with minimal client-side logic
- Prisma ORM for type-safe database access
- Role-based access control handled at the application level
- Shadcn/ui used for consistent UI components
- Live Demo: Smart Assignment Manager
- Automatic deployment is enabled on Vercel for the
mainbranch. - Environment variables are securely configured in Vercel.