Behind the Scenes of LexiFlash Backend - My Flashcard API Project
LexiFlash Backend - Simple CSV-Based Flashcard Loader and API
LexiFlash is my side project for learning with flashcards.
This repo - LexiFlash-backend - is a lightweight backend that powers the app.
It loads flashcards from a CSV file into a MongoDB database and serves them through a simple API.
What problem does it solve?
I wanted a fast way to:
- Define flashcards in a human-readable format (CSV)
- Bulk-load them into a proper database
- Expose the data via a clean, minimal REST API for a front-end client
It’s not a full-featured backend with auth or admin panel - just the essentials to drive learning logic from structured data.
How it works
- 📦 Data Source: A
.csvfile withquestion,answer,deck,categorycolumns - 💾 Database: MongoDB for
cards,decks,categories - 🧪 Loader: Node.js script that reads CSV and inserts rows using
pg-promise - 🌐 API: Simple Express app exposing endpoints like
/cards,/decks
Example CSV input
question,answer,deck,category
What is the capital of France?,Paris,Geography,Europe
2 + 2?,4,Math,Basics
Sample endpoint
GET /cards
[
{
"id": 1,
"question": "What is the capital of France?",
"answer": "Paris",
"deck": "Geography",
"category": "Europe"
},
...
]
Why build it this way?
I wanted to focus on content first, not UI or full stack complexity.
- CSV is easy to edit, version, and generate.
- MongoDB gives me structured querying (e.g. filter by deck or category).
- Express +
pg-promisewas fast to set up without overengineering.
What’s next?
- Add endpoint filtering (e.g. by deck/category)
- Add randomizer logic for practicing
- Possibly switch to SQLite for offline local mode
- Add validation and error handling to the import process
- Expose
/statsendpoint (cards per deck, etc.)
Final thoughts
LexiFlash-backend isn’t fancy, but it solves a real need:
Get structured flashcard data from CSV into an API quickly.
It’s a clean foundation I can build on - and perfect for early prototyping.
Bartłomiej Nowak
Programmer
Programmer focused on performance, simplicity, and good architecture. I enjoy working with modern JavaScript, TypeScript, and backend logic — building tools that scale and make sense.