How oliviatoratti/ai-project works
Nexus is a personal publishing app. Readers browse articles, while authors register or log in, draft posts, optionally request an AI summary, publish, and view their posts. The React router connects these screens to an Express API; that API handles authentication and post operations using Mongoose models, and can call OpenAI for summaries. The excerpts show the main routes and client requests; the README documents MongoDB and the broader product scope. The graph does not infer unshown client behavior or treat JWT handling as a separate service.
Main entry points: server.js API routes · App.jsx App routing · CreatePost.jsx Post editor · Register.jsx Registration
Components 13
React client
- App routing
client/src/App.jsx - Home
client/src/pages/Home.jsx - Registration
client/src/pages/Register.jsx - Login
client/src/pages/Login.jsx - Post editor
client/src/pages/CreatePost.jsx - Personal posts
client/src/pages/MyPosts.jsx - Article view
client/src/pages/Article.jsx
Express API
- API routes
server/server.js
Mongoose models
- User model
server/models/User.js - Post model
server/models/Post.js
Other components
- Author / reader
- MongoDB
- OpenAI API
Connections 17
- Author / reader → App routing: uses
client/src/App.jsx - App routing → Home: routes to
client/src/App.jsx - App routing → Registration: routes to
client/src/App.jsx - App routing → Login: routes to
client/src/App.jsx - App routing → Post editor: protects route
client/src/App.jsx - App routing → Personal posts: protects route
client/src/App.jsx - App routing → Article view: routes to
client/src/App.jsx - Registration → API routes: registers via
client/src/pages/Register.jsx - Login → API routes: logs in via
client/src/pages/Login.jsx - Post editor → API routes: publishes via
client/src/pages/CreatePost.jsx - Post editor → API routes: requests summary
client/src/pages/CreatePost.jsx - Personal posts → API routes: loads posts
client/src/pages/MyPosts.jsx - Article view → API routes: loads article
client/src/pages/Article.jsx - API routes → User model: reads and writes
server/server.js - API routes → Post model: reads and writes
server/server.js - API routes → MongoDB: connects to
server/server.js - API routes → OpenAI API: requests summary
server/server.js