Atlas is a full-stack spaced-repetition learning app for creating decks, managing cards, and building a consistent study practice.
Instead of reviewing every card on a fixed schedule, Atlas schedules each review with the SM-2 algorithm — cards you remember easily come back less often, and cards you struggle with come back sooner.
Live demo: flashcards-frontend-4k0c.onrender.com · API: flashcards-syn5.onrender.com · API docs: flashcards-syn5.onrender.com/docs
Note
The live demo is hosted on Render. If it has been idle, the first load can take a little while to wake up, give it a minute and refresh before assuming it is broken.
-
Account registration and JWT-based authentication
-
Deck and card creation, editing, and deletion
-
Tags and search across cards, decks, and tags
-
Spaced-repetition study sessions with progress tracking
-
PostgreSQL persistence and Alembic database migrations
-
Responsive React interface
-
Frontend: React, TypeScript, Vite, Tailwind CSS, Axios
-
Backend: FastAPI, SQLAlchemy, Alembic
-
Database: PostgreSQL
-
Development environment: Docker Compose
-
Testing: Pytest (backend), Vitest and Testing Library (frontend)
Atlas uses the SuperMemo SM-2 algorithm, implemented in backend/app/core/scheduler.py.
When you finish a card, you rate how well you remembered it on a scale of 0 to 5:
-
A rating below 3 counts as a lapse. Your repetitions reset to 0 and the card is scheduled again in 1 day.
-
A rating of 3 or higher counts as a successful recall. The interval grows: 1 day after the first successful review, 6 days after the second, and then the previous interval multiplied by your ease factor.
-
Your ease factor starts at 2.5 and adjusts with each rating. It never drops below 1.3, so a difficult card comes back more often without collapsing to daily reviews forever.
Study sessions serve cards due first, ordered by next review date, and then cards you have never seen. Progress for a deck is reported as total, due, new, and completed cards.
For the Docker setup, you only need:
- Docker with Docker Compose
For local development without Docker, you also need:
-
Python 3.11
-
Node.js 20
-
PostgreSQL 15, or another PostgreSQL database you can connect to
-
Clone the repository and move into it:
git clone https://github.com/Anthnyko/Atlas.git cd Atlas -
Create the environment files described in Environment variables below. At a minimum, Docker Compose expects a
.envfile in the project root andbackend/.env.local. The local values in that section are enough to run the app on your own machine. -
Start the stack:
docker compose up --build
The backend container runs
alembic upgrade headbefore starting, so database migrations are applied automatically on boot. The database container has to pass its health check before the backend starts. -
Open the app:
Service URL Frontend http://localhost:5173 Backend API http://localhost:8000 API docs (Swagger UI) http://localhost:8000/docs Health check http://localhost:8000/health Database health check http://localhost:8000/health/db PostgreSQL is also exposed on
localhost:5432if you want to inspect it with your own client. -
Register an account from the frontend, create a deck, add some cards, and start a study session.
To stop the stack, press Ctrl+C and then run:
docker compose downYour data is kept in the postgres_data volume. Add -v to that command only if you want to delete the database as well.
Run the database, backend, and frontend in three terminals. You can run just PostgreSQL in Docker with docker compose up db and run the other two locally, which is usually the easiest local setup.
Backend:
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reload --port 8000On Windows, activate the virtual environment with .venv\Scripts\activate instead.
Make sure the backend environment variables below are available before starting it — the app reads them from a .env file (see backend/app/core/config.py).
Frontend, in a second terminal:
cd frontend
npm install
npm run devThe frontend runs on http://localhost:5173 and expects the API at the address set in VITE_API_URL.
These four variables are required. They are defined in backend/app/core/config.py, and there are no defaults — the backend will not start without them.
| Variable | What it is | Local example |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | See below |
JWT_SECRET |
Secret used to sign JWTs | A long random string of your own |
JWT_ALGORITHM |
JWT signing algorithm | HS256 |
ACCESS_TOKEN_EXPIRE_MINUTES |
How long a login token stays valid, in minutes | 30 |
For the Docker Compose setup, DATABASE_URL points at the database service in docker-compose.yml:
DATABASE_URL=postgresql://postgres:password@db:5432/flashcards
Those credentials (postgres / password, database flashcards) are the local development values from docker-compose.yml. They are for running the app on your own machine only.
For local development without Docker, the host is normally localhost instead of db:
DATABASE_URL=postgresql://postgres:password@localhost:5432/flashcards
Use your own JWT_SECRET and your own database credentials anywhere outside local development, and never commit a production secret or a production database URL.
In the Docker setup, Compose loads environment from ./.env in the project root and from ./backend/.env.local. Keep the four required variables available in one of those files before you run docker compose up.
| Variable | What it is | Local value |
|---|---|---|
VITE_API_URL |
Base URL of the backend API | http://localhost:8000 |
This is set in frontend/.env.local for local development. In production, frontend/.env.production points it at the deployed backend.
The API is a FastAPI application. The interactive documentation at /docs is the full reference — this is a summary of the route groups mounted in backend/app/main.py.
| Prefix | What it covers |
|---|---|
/auth |
Register, log in, get the current user, log out |
/decks |
List, create, get, and delete your own decks |
/cards |
Create, list, update, and delete cards in a deck |
/study |
Start a session, get the next card, submit an answer, practice, and view progress |
/search |
Search your cards, decks, and tags with ?q= |
/tags |
Create tags and assign or remove them from cards |
/health |
GET /health and GET /health/db health checks |
Most routes require a JWT bearer token from /auth/login. Deck, card, study, search, and tag routes are scoped to the signed-in user — a deck or card that belongs to someone else returns 404 Not Found rather than the resource.
A study answer is submitted as a quality score from 0 to 5:
POST /study/submit-answer?card_id=<id>&quality=<0-5>
Backend tests cover the SM-2 scheduler and the study card selector:
cd backend
pytestFrontend tests run with Vitest:
cd frontend
npm test
npm run test:watchatlas/
├── backend/ # FastAPI application and Alembic migrations
│ ├── app/
│ │ ├── core/ # Settings, SM-2 scheduler, card selector, security
│ │ ├── db/ # Database session
│ │ ├── dependencies/ # Auth dependency (current user)
│ │ ├── models/ # SQLAlchemy models: user, deck, card, tag, review history
│ │ ├── routers/ # auth, decks, cards, study, search, tags
│ │ ├── schemas/ # Pydantic request and response schemas
│ │ └── main.py # FastAPI app, CORS, router registration, health checks
│ ├── migrations/ # Alembic migrations
│ ├── tests/ # Pytest tests for the scheduler and selector
│ ├── Dockerfile
│ ├── pytest.ini
│ └── requirements.txt
├── frontend/ # React + TypeScript application
│ ├── src/
│ │ ├── api/ # Axios client and API calls
│ │ ├── components/ # Shared components
│ │ ├── context/ # React context
│ │ ├── pages/ # Dashboard, deck view, study and practice sessions, search, login, register
│ │ ├── router/ # Route definitions
│ │ └── test/ # Vitest setup
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml # db (PostgreSQL 15), backend (8000), frontend (5173)
└── README.md
Atlas is deployed on Render, with the frontend and backend as separate services. The production frontend is configured with VITE_API_URL pointing at the production backend, and the backend's CORS origins include the production frontend URL and the local development URLs.
A GitHub Actions keepalive workflow (.github/workflows/keepalive.yml) pings the backend's /health/db endpoint on Mondays and Thursdays to reduce cold starts.
MIT — see LICENSE. Copyright (c) 2026 Anthony Co.

