Socrato is a full-stack AI study assistant that turns raw notes into concise summaries and practice questions. Socrato's goal is to help students study faster and more effectively before quizzes or exams. It has a Next.js frontend and FastAPI backend.
Study-One/
├── frontend/ → Next.js web app
├── backend/ → FastAPI server
├── shared/ → Shared type definitions (API contract)
Both services run locally and communicate over HTTP.
Create a .env file at the project root (Study-One/.env).
# Backend (loaded from project root)
GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
# DATABASE_URL=
# JWT_SECRET=
# ENV=development
# Frontend (optional; defaults to http://localhost:8000)
NEXT_PUBLIC_API_URL=The backend starts without GEMINI_API_KEY (e.g. for CI or running tests); the generate endpoint will return an error until the key is set.
-
Navigate to the frontend folder:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and go to:
http://localhost:3000
-
Navigate to the backend folder:
cd backend -
(Optional but recommended) Create a virtual environment:
python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Start the server:
uvicorn main:app --reload
-
Backend will be available at:
http://localhost:8000 -
Health check endpoint:
http://localhost:8000/health
Clone the repository:
git clone https://github.com/utmgdsc/Study-One.git
cd Study-OneFrom here you can run the frontend and backend independently using the instructions above.
Generates study materials (summary and quiz questions) from user notes.
Request Body:
{
"text": "string (required, non-empty)"
}Response:
{
"summary": ["string", "string", "..."],
"quiz": [
{
"question": "string",
"options": ["string", "string", "string", "string"],
"answer": "string"
}
]
}Schema Files:
| Location | Description |
|---|---|
shared/types.ts |
Canonical TypeScript interface definitions |
frontend/src/types/api.ts |
Frontend TypeScript types (mirrors shared) |
backend/main.py |
Pydantic models (mirrors shared contract) |
- Frontend runs on port 3000, backend on port 8000. Run both for full functionality.
- Frontend calls the backend at
NEXT_PUBLIC_API_URL(defaulthttp://localhost:8000). - For running backend tests, see backend/README.md.