Cardsy is a scalable, production-grade learning platform built around spaced repetition, analytics, and gamified practice.
It combines Node.js microservices, a C++ native scheduling engine, and a Mongo + PostgreSQL + Redis data strategy to deliver high performance and deep learning insights.
- Dashboard →
- Analytics →
- Decks Page →
- Flashcard (Question) →
- Flashcard (Answer & Evaluation) →
| Service | Responsibility | Stack |
|---|---|---|
| Auth | JWT, OAuth, sessions | Node.js + PostgreSQL |
| Deck | Deck & card CRUD | Node.js + MongoDB |
| Practice Engine | Card ranking & SRS | Node.js + C++ + C++ Addon |
| Gamification | XP, streaks, leaderboards | Node.js + Redis |
| Analytics | Aggregations & insights | Node.js + PostgreSQL (TimescaleDB) |
Communication
- gRPC / REST via API Gateway
- Realtime updates via WebSockets
Frontend
- React + Tailwind CSS
- Recharts / Chart.js
- User starts a session
- Due cards fetched from MongoDB
- Metadata sent to C++ SRS engine
- Engine ranks cards (Regular / Hard mode)
- Node streams cards to frontend
- User responses update progress
- XP & analytics processed asynchronously
EF' = EF + (0.1 - (5 - quality) * (0.08 + (5 - quality) * 0.02))
interval = previous_interval * EF'
quality: 0–5 (derived from correctness + response time)EFstarts at2.5, min1.3- Implemented in C++ (Node Addon) for 10–20× speedup
- XP, levels, streaks, badges
- Redis Sorted Sets for leaderboards:
ZINCRBY leaderboard:userXP <value> <user_id>
- Weekly resets via Redis Lua scripts
- Daily activity heatmaps (365 days)
- Deck-wise accuracy & mastery
- Retention curves & streak tracking
- Auto-tagging of easy / medium / hard cards
| Data | Database |
|---|---|
| Users, Auth | PostgreSQL |
| Decks, Cards | MongoDB |
| User Progress | MongoDB |
| XP, Streaks | Redis + PostgreSQL |
| Analytics | PostgreSQL (TimescaleDB) |
- Spaced repetition (Easy / Normal / Hard modes)
- Paragraph & MCQ answers
- Markdown, LaTeX & images in cards
- Public & private decks
- Deck sharing & invites
- Collaborative decks
- Deck duplication
- XP & levels
- Daily / monthly streaks
- Achievements & badges
- Deck-level leaderboards
- Friend profiles
- Popular deck discovery
- Competitive challenges
- Card priority ranking
- Adaptive difficulty tuning
- Recall probability estimation
- Full-text search & ranking (optional)
#include <napi.h>
Napi::Object CalculateNextReview(const Napi::CallbackInfo& info);
const srs = require('./build/Release/srs.node');
const ranked = srs.rankCards(payload);- Hybrid Node.js + C++ backend
- Custom SM-2 spaced repetition engine
- Event-driven architecture with Redis & queues
- Tri-database design for scale & performance
- Real-time gamification & analytics
Built for learning. Engineered for scale.