A full-stack AI-powered learning tracker built for developers. Create topics, write or generate notes with AI, take quizzes, and track your progress β all in one place.
- π€ Authentication β Secure signup/login with better-auth
- π Topics System β Create, manage, and delete learning topics
- π Notes β Add notes manually or generate them using AI
- π Progress Tracking β Mark topics as Not Started / In Progress / Completed with a progress slider
- π€ AI Integration β Generate structured notes and quizzes powered by Groq (LLaMA 3.3)
- π― Interactive Quizzes β Test your knowledge with AI-generated multiple choice questions
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS + shadcn/ui |
| Database | PostgreSQL |
| ORM | Drizzle ORM |
| Auth | better-auth |
| AI | Groq API (LLaMA 3.3 70B) via Vercel AI SDK |
| Package Manager | pnpm |
devtrack-ai/
β
βββ app/
β βββ (auth)/ # Login & Signup pages
β β βββ login/page.tsx
β β βββ signup/page.tsx
β βββ (dashboard)/ # Protected dashboard routes
β β βββ layout.tsx # Sidebar + header shell
β β βββ dashboard/page.tsx # Overview with stats
β β βββ topics/
β β β βββ page.tsx # All topics list
β β β βββ [topicId]/page.tsx # Topic detail + notes
β β βββ settings/page.tsx
β βββ api/
β β βββ auth/[...all]/ # better-auth handler
β β βββ topics/ # Topics CRUD
β β β βββ [topicId]/
β β β βββ notes/ # Notes CRUD
β β βββ ai/
β β βββ generate-notes/ # AI note generation
β β βββ generate-quiz/ # AI quiz generation
β βββ layout.tsx
β βββ page.tsx # Landing page
β
βββ components/
β βββ ui/ # shadcn components
β βββ topics/ # TopicCard, CreateTopicDialog, ProgressControl
β βββ notes/ # NoteCard, AddNoteForm, GenerateNotesButton
β βββ ai/ # QuizModal
β βββ shared/ # Sidebar, Header
β
βββ lib/
β βββ db/
β β βββ index.ts # Drizzle client
β β βββ schema.ts # Database schema
β βββ auth/
β β βββ index.ts # better-auth server config
β β βββ client.ts # Auth client helpers
β βββ ai/
β βββ index.ts # Groq AI client
β
βββ hooks/
β βββ useTopics.ts
β βββ useNotes.ts
β
βββ types/index.ts
βββ middleware.ts # Route protection
βββ drizzle.config.ts
- Node.js 18+
- pnpm
- PostgreSQL database (local or Neon β free cloud option)
- Groq API key β free, no credit card needed
git clone https://github.com/yourusername/devtrack-ai.git
cd devtrack-aipnpm installCreate a .env.local file in the root:
# Database
DATABASE_URL="postgresql://postgres:yourpassword@localhost:5432/devtrack_ai"
# Better Auth
BETTER_AUTH_SECRET="your-random-secret-here"
BETTER_AUTH_URL="http://localhost:3000"
NEXT_PUBLIC_BETTER_AUTH_URL="http://localhost:3000"
# AI β Groq (free at console.groq.com)
GROQ_API_KEY="your-groq-key-here"To generate a BETTER_AUTH_SECRET:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Option A β Local PostgreSQL:
psql -U postgres
CREATE DATABASE devtrack_ai;
\qOption B β Neon (recommended, free cloud DB):
Go to neon.tech β create a project β copy the connection string into DATABASE_URL.
pnpm db:pushpnpm devOpen http://localhost:3000 β you should see the landing page.
| Command | Description |
|---|---|
pnpm db:push |
Push schema changes directly to the database |
pnpm db:generate |
Generate migration files |
pnpm db:migrate |
Run migrations |
pnpm db:studio |
Open Drizzle Studio (visual DB browser) |
DevTrack AI uses Groq with the LLaMA 3.3 70B model for:
- Click Generate with AI on any topic page
- Optionally specify a subtopic (e.g.
useState,JWT,indexes) - AI generates structured markdown notes with code examples
- Notes are saved with an AI badge indicator
- Click Take Quiz on any topic page
- AI generates 5 multiple choice questions based on your notes
- Get instant feedback and explanations for each answer
- See your final score with a performance rating
users
βββ topics (userId β users.id)
βββ notes (topicId β topics.id, userId β users.id)
sessions, accounts, verifications (managed by better-auth)
Topic status: not_started | in_progress | completed
Topic progress: 0β100 (integer)
Note isAiGenerated: "true" | "false" (string)
- Signup/Login handled by better-auth with email + password
- Sessions stored in PostgreSQL via Drizzle adapter
- Protected routes (
/dashboard,/topics,/settings) redirect to/loginif no session cookie - Auth routes (
/login,/signup) redirect to/dashboardif already logged in
- Push your code to GitHub
- Go to vercel.com β Import project
- Add all environment variables from
.env.local - Change
BETTER_AUTH_URLandNEXT_PUBLIC_BETTER_AUTH_URLto your production domain - Deploy
Make sure to use a cloud database like Neon for production β local PostgreSQL won't work on Vercel.
{
"better-auth": "^1.x",
"drizzle-orm": "^0.31.x",
"ai": "^4.x",
"@ai-sdk/groq": "^1.x",
"pg": "^8.x",
"zod": "^3.x",
"lucide-react": "^0.x",
"date-fns": "^4.x",
"sonner": "^1.x"
}- Search across notes
- Export notes as PDF
- Quiz history and scoring trends
- Dark/light mode toggle
- AI chat assistant per topic
- Public topic sharing
MIT License β feel free to use this project for learning or as a base for your own apps.