How saadkhan10412/tokentrail works
TokenTrail is an AI discovery and learning product: users browse articles, snippets, and AI model listings, with profiles and bookmarks for personalization. The backend exposes these capabilities through FastAPI and persists content and user activity; separate automation fetches and enriches feed content and generates snippets. The README is empty, and frontend-to-API wiring was not shown, so that relationship is left unverified rather than asserted.
Main entry points: main.py API entry · content.py Content models · snippets.py Snippet routes · models.py Model routes
Components 34
Web experience
- Application UI
frontend/js/app.js - Explore UI
frontend/js/explore.js - Snippet UI
frontend/js/snippets.js - Authentication UI
frontend/js/auth.js - Auth guard
frontend/js/auth-guard.js - Progress UI
frontend/js/progress.js
API and identity
- API entry
backend/app/main.py - User routes
backend/app/routers/users.py - Profile routes
backend/app/routers/profiles.py - Auth service
backend/app/services/auth.py - Auth dependency
backend/app/utils/dependencies.py
Content discovery
- Article routes
backend/app/routers/articles.py - Category routes
backend/app/routers/categories.py - Source routes
backend/app/routers/sources.py - Snippet routes
backend/app/routers/snippets.py - Model routes
backend/app/routers/models.py - Model service
backend/app/services/models.py - Profile service
backend/app/services/profile.py - Content models
backend/app/models/content.py - User models
backend/app/models/users.py - Activity models
backend/app/models/activity.py - Ingestion models
backend/app/models/ingestion.py - Taxonomy models
backend/app/models/taxonomy.py - Database access
backend/app/database.py
Content automation
- Feed fetcher
backend/app/automation/feeds.py - Article ingestion
backend/app/automation/ingest.py - Snippet generation
backend/app/automation/generate_snippets.py - Article AI processing
backend/app/services/ai/processor.py - AI snippet generator
backend/app/services/ai/snippet_generator.py - AI client
backend/app/services/ai/client.py
Other components
- Reader
- Supabase Auth
- OpenRouter
- GitHub data
Connections 40
- Reader → Application UI: uses
- Application UI → API entry: requests API
- API entry → User routes: registers
backend/app/main.py - API entry → Profile routes: registers
backend/app/main.py - API entry → Article routes: registers
backend/app/main.py - API entry → Category routes: registers
backend/app/main.py - API entry → Source routes: registers
backend/app/main.py - API entry → Snippet routes: registers
backend/app/main.py - API entry → Model routes: registers
backend/app/main.py - User routes → Auth service: calls
backend/app/routers/users.py - Auth service → Supabase Auth: sends auth requests
backend/app/services/auth.py - Auth dependency → Auth service: verifies token
backend/app/utils/dependencies.py - Profile routes → Profile service: calls
backend/app/routers/profiles.py - Profile routes → Auth dependency: requires user
backend/app/routers/profiles.py - Snippet routes → Auth dependency: requires user
backend/app/routers/snippets.py - Model routes → Auth dependency: uses dependency
backend/app/routers/models.py - Article routes → Content models: queries
backend/app/routers/articles.py - Category routes → Content models: queries
backend/app/routers/categories.py - Source routes → Content models: queries
backend/app/routers/sources.py - Snippet routes → Content models: queries snippets
backend/app/routers/snippets.py - Snippet routes → User models: queries bookmarks
backend/app/routers/snippets.py - Model routes → Content models: queries models
backend/app/routers/models.py - Model routes → User models: queries user data
backend/app/routers/models.py - Model routes → Model service: calls
backend/app/routers/models.py - Profile service → User models: uses
backend/app/services/profile.py - Article routes → Database access: gets session
backend/app/routers/articles.py - Snippet routes → Database access: gets session
backend/app/routers/snippets.py - Article ingestion → Feed fetcher: fetches feeds
backend/app/automation/ingest.py - Article ingestion → Article AI processing: processes articles
backend/app/automation/ingest.py - Article ingestion → Content models: stores articles
backend/app/automation/ingest.py - Article ingestion → Database access: opens session
backend/app/automation/ingest.py - Feed fetcher → Content models: reads sources
backend/app/automation/feeds.py - Feed fetcher → Database access: opens session
backend/app/automation/feeds.py - Feed fetcher → GitHub data: uses GitHub data
- Article AI processing → AI client: generates JSON
backend/app/services/ai/processor.py - Snippet generation → AI snippet generator: generates snippets
backend/app/automation/generate_snippets.py - AI snippet generator → AI client: generates JSON
backend/app/services/ai/snippet_generator.py - AI client → OpenRouter: sends prompts
backend/app/services/ai/client.py - Snippet generation → Content models: reads and writes
backend/app/automation/generate_snippets.py - Snippet generation → Database access: opens session
backend/app/automation/generate_snippets.py