How frakhmann/scribbles-backend works
This is a FastAPI backend for a university-oriented social feed. Users register and authenticate, then create and browse posts, comment and like content, and manage profiles and follows; university and section endpoints provide feed context. The sampled code confirms post creation/deletion broadcasts to connected feed clients. Router files for several advertised-by-tree domains were not sampled, and there is no README, so their internal behavior and wiring are not inferred.
Main entry points: main.py FastAPI app · generated_models.py ORM models · routes.py Auth routes · profile.py Profiles and follows
Components 24
API entrypoints
- FastAPI app
app/main.py - Feed WebSocket
app/main.py
Identity and profiles
- Auth routes
app/auth/routes.py - Auth dependencies
app/auth/dependencies.py - Auth utilities
app/auth/utils.py - Profiles and follows
app/routers/profile.py - User data access
app/crud/user.py - User schemas
app/schemas/user.py
Social feed
- Post routes
app/routers/posts.py - Post data access
app/crud/post.py - Comment routes
app/routers/comments.py - Comment data access
app/crud/comment.py - Comment schemas
app/schemas/comment.py - Like routes
app/routers/likes.py - Like data access
app/crud/like.py
University context
- Section routes
app/routers/sections.py - University routes
app/routers/universities.py
Persistence and realtime
- DB sessions
app/db/session.py - ORM models
app/models/generated_models.py - Relational database
- WebSocket manager
app/core/ws_manager.py - Static media files
app/static
Other components
- API client
- Email service
Connections 42
- API client → FastAPI app: HTTP requests
- FastAPI app → Auth routes: routes to
- FastAPI app → Profiles and follows: routes to
- FastAPI app → Post routes: routes to
- FastAPI app → Comment routes: routes to
- FastAPI app → Like routes: routes to
- FastAPI app → Section routes: routes to
- FastAPI app → University routes: routes to
- FastAPI app → Feed WebSocket: serves
- Auth routes → Auth dependencies: validates identity
- Auth routes → Auth utilities: verifies and issues
- Auth routes → User data access: looks up users
- Auth routes → ORM models: queries and updates
- Auth routes → Email service: sends verification
- Auth routes → User schemas: validates payloads
- Profiles and follows → Auth dependencies: requires identity
- Profiles and follows → ORM models: queries and updates
- Profiles and follows → Post data access: loads user posts
- Profiles and follows → Comment data access: loads user comments
- Profiles and follows → Like data access: loads liked items
- Profiles and follows → Static media files: saves avatar media
- Post routes → Auth dependencies: requires identity
- Post routes → Post data access: creates posts
- Post routes → ORM models: queries and deletes
- Post routes → Static media files: saves post media
- Post routes → WebSocket manager: broadcasts events
- Comment routes → Comment data access: manages comments
- Comment routes → Comment schemas: validates payloads
- Comment routes → Auth dependencies: requires identity
- Like routes → Like data access: manages likes
- Like routes → Auth dependencies: requires identity
- Section routes → ORM models: queries context
- University routes → ORM models: queries context
- DB sessions → Relational database: opens sessions
- DB sessions → ORM models: provides ORM base
- Feed WebSocket → WebSocket manager: connects clients
- WebSocket manager → API client: broadcasts feed events
- Post data access → ORM models: persists posts
- Comment data access → ORM models: persists comments
- Like data access → ORM models: persists likes
- User data access → ORM models: persists users
- Static media files → API client: serves media