How belotti17/x-clone works
X Clone is a server-rendered social platform whose main workflow is account creation and OTP verification, followed by a protected personalized timeline where users publish and interact with posts. Routes dispatch requests to controllers; the application also supports profiles, follows, search/trending, communities, and private messages. Controllers use Lucid models for persistent domain data. The README documents additional interface and security capabilities, but views are absent from the supplied tree. Relationships among unsampled controllers and models are shown only where documentation supports them.
Main entry points: routes.ts HTTP routes · user.ts User · database.ts PostgreSQL · tweet.ts Tweet
Components 23
Web entry and identity
- HTTP routes
start/routes.ts - Account registration
app/controllers/new_account_controller.ts - OTP verification
app/controllers/auth_controller.ts - Session login
app/controllers/session_controller.ts - Interactive browser UI
resources/js/index.js
Posts and interactions
- Timeline
app/controllers/timeline_controller.ts - Tweet actions
app/controllers/tweets_controller.ts
Profiles and discovery
- Profile management
app/controllers/profile_controller.ts - Follow actions
app/controllers/follows_controller.ts - Search
app/controllers/searches_controller.ts - Trending hashtags
app/controllers/hashtags_controller.ts - Communities
app/controllers/communities_controller.ts
Private messaging
- Messaging
app/controllers/messages_controller.ts
Domain persistence
Other components
- Visitor
- Email service
Connections 38
- Visitor → HTTP routes: requests
start/routes.ts - Interactive browser UI → HTTP routes: fetches
- HTTP routes → Account registration: dispatches
start/routes.ts - HTTP routes → OTP verification: dispatches
start/routes.ts - HTTP routes → Session login: dispatches
start/routes.ts - HTTP routes → Timeline: dispatches
start/routes.ts - HTTP routes → Tweet actions: dispatches
start/routes.ts - HTTP routes → Profile management: dispatches
start/routes.ts - HTTP routes → Follow actions: dispatches
start/routes.ts - HTTP routes → Search: dispatches
start/routes.ts - HTTP routes → Trending hashtags: dispatches
start/routes.ts - HTTP routes → Communities: dispatches
start/routes.ts - HTTP routes → Messaging: dispatches
start/routes.ts - Account registration → Email service: sends OTP
- Account registration → OTP token: creates token
- OTP verification → OTP token: verifies token
- Messaging → Message: reads and writes
app/controllers/messages_controller.ts - Messaging → User: queries users
app/controllers/messages_controller.ts - User → Tweet: relates to
app/models/user.ts - User → Like: relates to
app/models/user.ts - User → Retweet: relates to
app/models/user.ts - User → Follow: relates to
app/models/user.ts - Tweet → User: belongs to
app/models/tweet.ts - Tweet → Like: relates to
app/models/tweet.ts - Like → Tweet: belongs to
app/models/like.ts - Like → User: belongs to
app/models/like.ts - Retweet → Tweet: belongs to
app/models/retweet.ts - Retweet → User: belongs to
app/models/retweet.ts - Follow → User: references users
app/models/follow.ts - Message → User: references users
app/models/message.ts - OTP token → User: belongs to
app/models/email_verification_token.ts - User → PostgreSQL: persists through ORM
- Tweet → PostgreSQL: persists through ORM
- Like → PostgreSQL: persists through ORM
- Retweet → PostgreSQL: persists through ORM
- Follow → PostgreSQL: persists through ORM
- Message → PostgreSQL: persists through ORM
- OTP token → PostgreSQL: persists through ORM