Skip to content

Commit 19be246

Browse files
Update README.md
1 parent 9755e89 commit 19be246

File tree

1 file changed

+86
-173
lines changed

1 file changed

+86
-173
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 86 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -1,194 +1,107 @@
1-
# AITutor β€” Production-Ready Web App
1+
<div align="center">
2+
3+
<img src="https://img.shields.io/badge/Production%20Ready-Ready%20to%20Deploy-8B5CF6?style=for-the-badge&logo=rocket&logoColor=white" alt="Production Ready" />
4+
5+
<h1 style="font-size: 3.8rem; margin: 16px 0 8px; background: linear-gradient(90deg, #A78BFA, #C4B5FD, #DDD6FE); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800;">
6+
✨ AITutor
7+
</h1>
8+
9+
<h3 style="color: #64748B; font-weight: 500;">AI-Powered Tutor for Indian Students</h3>
10+
11+
<p style="font-size: 1.35rem; max-width: 620px; margin: 20px auto;">
12+
Enter <strong>any topic</strong> β†’ Receive a crystal-clear explanation β†’ Take a smart 10-question mock test grounded in what you just learned.
13+
</p>
14+
15+
<img src="https://api.pikwy.com/web/69a2a331decb0d637029bd48.png"
16+
alt="AITutor Preview"
17+
width="920"
18+
style="border-radius: 24px; box-shadow: 0 30px 80px -20px rgba(167, 139, 246, 0.5); margin: 30px 0 40px;">
19+
20+
<p>
21+
<img src="https://img.shields.io/badge/Next.js-14-black?style=for-the-badge&logo=nextdotjs&logoColor=white" />
22+
<img src="https://img.shields.io/badge/FastAPI-009688?style=for-the-badge&logo=fastapi&logoColor=white" />
23+
<img src="https://img.shields.io/badge/Python-3.12-3776AB?style=for-the-badge&logo=python&logoColor=white" />
24+
<img src="https://img.shields.io/badge/Tailwind_CSS-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white" />
25+
<img src="https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white" />
26+
</p>
27+
28+
</div>
229

3-
Tutor for Indian students. Enter any topic, get a clear explanation, then take a 10-question mock test grounded in that explanation.
4-
5-
## Tech Stack
30+
---
631

7-
| Layer | Technology |
8-
|-----------|-----------------------------------------|
9-
| Frontend | Next.js 14 (App Router), TypeScript, Tailwind CSS |
10-
| Backend | FastAPI, Python 3.12, Pydantic v2 |
11-
| API | OpenRouter β†’ GPT-OSS 120B (deep reasoning) |
12-
| Deploy | Docker + docker-compose |
32+
## 🌟 Why AITutor?
1333

14-
## Project Structure
34+
**Learning made delightful for Bharat’s students.**
1535

16-
```
17-
aitutor/
18-
β”œβ”€β”€ src/
19-
β”‚ β”œβ”€β”€ backend/
20-
β”‚ β”‚ β”œβ”€β”€ app/
21-
β”‚ β”‚ β”‚ β”œβ”€β”€ core/config.py # Settings (pydantic-settings)
22-
β”‚ β”‚ β”‚ β”œβ”€β”€ models/schemas.py # Request/response Pydantic models
23-
β”‚ β”‚ β”‚ β”œβ”€β”€ services/api_service.py # All API logic isolated here
24-
β”‚ β”‚ β”‚ β”œβ”€β”€ api/routes/tutor.py # FastAPI route handlers
25-
β”‚ β”‚ β”‚ └── main.py # App factory + middleware
26-
β”‚ β”‚ β”œβ”€β”€ requirements.txt
27-
β”‚ β”‚ β”œβ”€β”€ Dockerfile
28-
β”‚ β”‚ └── .env.example
29-
β”‚ └── frontend/
30-
β”‚ β”œβ”€β”€ app/
31-
β”‚ β”‚ β”œβ”€β”€ components/
32-
β”‚ β”‚ β”‚ β”œβ”€β”€ layout/ # Navbar, Hero
33-
β”‚ β”‚ β”‚ β”œβ”€β”€ ui/ # Card, Button (reusable)
34-
β”‚ β”‚ β”‚ └── tutor/ # TutorApp, TopicInput, QuizView, etc.
35-
β”‚ β”‚ β”œβ”€β”€ hooks/useLearn.ts # All client state + API calls
36-
β”‚ β”‚ β”œβ”€β”€ lib/api.ts # Typed fetch wrapper
37-
β”‚ β”‚ β”œβ”€β”€ types/index.ts # Shared TypeScript types
38-
β”‚ β”‚ β”œβ”€β”€ layout.tsx
39-
β”‚ β”‚ └── page.tsx
40-
β”‚ β”œβ”€β”€ public/manifest.json
41-
β”‚ β”œβ”€β”€ tailwind.config.ts
42-
β”‚ β”œβ”€β”€ next.config.mjs
43-
β”‚ └── Dockerfile
44-
β”œβ”€β”€ deployment/ # Deployment configurations
45-
β”œβ”€β”€ docs/ # Documentation
46-
β”œβ”€β”€ vercel.json # Vercel configuration
47-
β”œβ”€β”€ render.yaml # Render configuration
48-
└── DEPLOYMENT.md # Deployment guide
49-
```
50-
51-
## Quick Start (Local Dev)
52-
53-
### Option 1: Using Modular Structure (Recommended)
54-
```bash
55-
# Backend
56-
cd backend
57-
cp .env.example .env
58-
# Edit .env with your OPENROUTER_API_KEY
59-
python -m uvicorn app.main:app --reload --port 8000
60-
61-
# Frontend (new terminal)
62-
cd frontend
63-
cp .env.example .env.local
64-
npm install
65-
npm run dev
66-
```
67-
68-
### Option 2: Using Original Structure
69-
```bash
70-
# Backend
71-
cd src/backend
72-
source venv/bin/activate
73-
python -m uvicorn app.main:app --reload --port 8000
36+
No more boring textbooks. Just type **β€œPhotosynthesis”**, **β€œQuadratic Equations”**, or **β€œIndian Independence”** and instantly get:
37+
- A beautifully structured, exam-focused explanation
38+
- A 10-question mock test that actually tests understanding
39+
- Instant scoring + detailed feedback
7440

75-
# Frontend
76-
cd src/frontend
77-
npm install
78-
npm run dev
79-
```
80-
81-
### 3. Open Browser
82-
Navigate to: http://localhost:3000 (or 3001/3002 if ports taken)
41+
Built from the ground up for Indian curriculum (CBSE, ICSE, State Boards, JEE/NEET ready).
8342

8443
---
8544

86-
## Production Deployment
45+
## ✨ Features
8746

88-
### πŸš€ Quick Deploy (Modular Structure)
89-
```bash
90-
# Deploy both services
91-
cd backend && ./deploy.sh
92-
cd ../frontend && ./deploy.sh
93-
```
47+
<div align="center" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin: 40px 0;">
9448

95-
### Option 1: Separate Modules (Recommended)
96-
- **Backend**: See [backend/README.md](backend/README.md) β†’ Deploy to Render
97-
- **Frontend**: See [frontend/README.md](frontend/README.md) β†’ Deploy to Vercel
98-
- **Guide**: See [QUICK_DEPLOY.md](QUICK_DEPLOY.md) for step-by-step
49+
<div style="background: #1E2937; padding: 28px; border-radius: 20px; border: 2px solid #A78BFA;">
50+
⚑ <strong>Lightning Fast</strong><br>
51+
<span style="color:#94A3B8;">30–60 seconds from topic to test</span>
52+
</div>
9953

100-
### Option 2: Original Structure
101-
- See [DEPLOYMENT.md](DEPLOYMENT.md) for combined deployment
54+
<div style="background: #1E2937; padding: 28px; border-radius: 20px; border: 2px solid #A78BFA;">
55+
🧠 <strong>120B Deep Reasoning</strong><br>
56+
<span style="color:#94A3B8;">Powered by GPT-OSS via OpenRouter</span>
57+
</div>
10258

103-
### Option 3: Full Modular Setup
104-
- See [MODULAR_DEPLOYMENT.md](MODULAR_DEPLOYMENT.md) for complete guide
59+
<div style="background: #1E2937; padding: 28px; border-radius: 20px; border: 2px solid #A78BFA;">
60+
πŸ“ <strong>Perfectly Grounded Quizzes</strong><br>
61+
<span style="color:#94A3B8;">Every question comes from the explanation</span>
62+
</div>
10563

106-
---
64+
<div style="background: #1E2937; padding: 28px; border-radius: 20px; border: 2px solid #A78BFA;">
65+
🎨 <strong>Stunning Light-Purple UI</strong><br>
66+
<span style="color:#94A3B8;">Modern, responsive, delightful to use</span>
67+
</div>
10768

108-
## Docker (Production)
69+
</div>
10970

110-
```bash
111-
# Set your API key in src/backend/.env first
112-
docker-compose up --build
113-
```
114-
115-
Frontend β†’ http://localhost:3000
116-
Backend API docs β†’ http://localhost:8000/docs
117-
118-
## API Endpoints
119-
120-
| Method | Path | Description |
121-
|--------|-------------------------|--------------------------------------|
122-
| POST | /api/v1/tutor/learn | Generate explanation + quiz (30-60s) |
123-
| POST | /api/v1/tutor/score | Score quiz answers (instant) |
124-
| GET | /api/v1/tutor/health | Health check |
125-
| GET | /docs | Swagger UI |
126-
127-
### POST /api/v1/tutor/learn
128-
```json
129-
{ "topic": "Photosynthesis", "language": "en" }
130-
```
131-
132-
**Response:**
133-
```json
134-
{
135-
"topic": "Photosynthesis",
136-
"explanation": "Photosynthesis is the process by which...",
137-
"quiz": [
138-
{
139-
"question": "According to the explanation...",
140-
"options": ["A) ...", "B) ...", "C) ...", "D) ..."],
141-
"answer": 0,
142-
"explanation": "...",
143-
"difficulty": 1
144-
}
145-
]
146-
}
147-
```
148-
149-
## Environment Variables
150-
151-
Create `.env.local` from `.env.example`:
71+
---
15272

153-
```bash
154-
# Required
155-
OPENROUTER_API_KEY=sk-or-v1-your-key-here
156-
NEXT_PUBLIC_API_URL=http://localhost:8000
73+
## πŸ›  Tech Stack
15774

158-
# Optional
159-
NODE_ENV=development
160-
```
75+
| Layer | Technology |
76+
|-------------|-------------------------------------------------|
77+
| **Frontend** | Next.js 14 (App Router), TypeScript, Tailwind CSS |
78+
| **Backend** | FastAPI, Python 3.12, Pydantic v2 |
79+
| **AI** | OpenRouter β†’ **GPT-OSS 120B** |
80+
| **Deploy** | Docker + docker-compose (production ready) |
16181

162-
## Development
82+
---
16383

164-
### Code Quality
165-
- TypeScript strict mode
166-
- ESLint + Prettier
167-
- Pre-commit hooks
168-
- Docker support
84+
## πŸ“ Project Structure
16985

170-
### Testing
17186
```bash
172-
# Backend tests
173-
cd src/backend && python -m pytest
174-
175-
# Frontend tests
176-
cd src/frontend && npm test
177-
```
178-
179-
## Production Features
180-
181-
- Production-ready code
182-
- Environment-based configuration
183-
- Health checks
184-
- Error handling
185-
- CORS support
186-
- Docker deployment
187-
- Vercel + Render deployment guides
188-
- Emoji-free UI (professional)
189-
- Responsive design
190-
- Three quiz modes (Standard, Adaptive, Swipe Cards)
191-
192-
## License
193-
194-
MIT License - see [LICENSE](LICENSE) for details.
87+
aitutor/
88+
β”œβ”€β”€ backend/
89+
β”‚ β”œβ”€β”€ app/
90+
β”‚ β”‚ β”œβ”€β”€ core/config.py # Settings (Pydantic)
91+
β”‚ β”‚ β”œβ”€β”€ models/schemas.py # Request / Response models
92+
β”‚ β”‚ β”œβ”€β”€ services/ai_service.py # All LLM logic
93+
β”‚ β”‚ β”œβ”€β”€ api/routes/tutor.py # FastAPI endpoints
94+
β”‚ β”‚ └── main.py # App factory
95+
β”‚ β”œβ”€β”€ requirements.txt
96+
β”‚ β”œβ”€β”€ Dockerfile
97+
β”‚ └── .env.example
98+
β”‚
99+
└── frontend/
100+
β”œβ”€β”€ app/
101+
β”‚ β”œβ”€β”€ components/tutor/ # TopicInput, QuizView...
102+
β”‚ β”œβ”€β”€ hooks/useLearn.ts # Client state + API
103+
β”‚ β”œβ”€β”€ lib/api.ts # Typed fetch
104+
β”‚ └── page.tsx
105+
β”œβ”€β”€ tailwind.config.ts
106+
β”œβ”€β”€ next.config.mjs
107+
└── Dockerfile

0 commit comments

Comments
Β (0)