How chiru-5/lawezy works
LawEzy is a legal-services platform whose main user journey is to find an advocate, book a consultation, and manage it alongside legal information and support features. The graph also covers account management, AI consultation, blogs, downloadable resources, and direct messaging. The README documents several capabilities whose page or runtime wiring was not sampled; those relationships are marked dashed when not directly evidenced. API-to-model and connection edges are supported by the indexed route references and route excerpts.
Main entry points: mongodb.js MongoDB Connection · auth-provider.jsx Session Provider · appointments/route.js Appointment API · register/route.js Authentication API
Components 24
Accounts & Profiles
- Account Pages
app/signup/page.jsx - Session Provider
lib/auth-provider.jsx - Profile Editor
app/profile/page.jsx - Advocate API
app/api/users/route.js - Authentication API
app/api/auth/register/route.js - Login API
app/api/auth/login/route.js
Legal Consultations
- Advocate Directory
app/appointments/page.jsx - Appointment Booking
app/appointments/book/[id]/page.jsx - Appointment API
app/api/appointments/route.js - Direct Messaging
app/chat/[id]/page.jsx
Legal Knowledge
- AI Consultation UI
app/ai-chat/page.jsx - Legal AI Engine
lib/gemini.js - Legal Blogs
app/blogs/page.jsx - Blog API
app/api/blogs/route.js - Legal Resources
app/resources/page.jsx - Resource API
app/api/resources/route.js
Platform Data
- User Model
models/User.js - Appointment Model
models/Appointment.js - Blog Model
models/Blog.js - Resource Model
models/Resource.js - Message Model
models/Message.js - MongoDB Connection
lib/mongodb.js
Other components
- Citizen
- Advocate
Connections 31
- Citizen → Account Pages: creates account
- Account Pages → Session Provider: submits credentials
app/signup/page.jsx - Session Provider → Authentication API: registers account
lib/auth-provider.jsx - Session Provider → Login API: authenticates
lib/auth-provider.jsx - Profile Editor → Session Provider: updates profile
app/profile/page.jsx - Citizen → Advocate Directory: finds advocate
README.md - Advocate Directory → Appointment Booking: opens booking
app/appointments/page.jsx - Citizen → Appointment Booking: requests consultation
README.md - Advocate → Appointment API: manages bookings
README.md - Appointment Booking → Appointment API: submits booking
- Appointment API → Appointment Model: uses model
app/api/appointments/route.js - Appointment API → MongoDB Connection: connects
app/api/appointments/route.js - Citizen → AI Consultation UI: asks legal question
README.md - AI Consultation UI → Legal AI Engine: requests response
app/ai-chat/page.jsx - Citizen → Legal Blogs: reads articles
README.md - Legal Blogs → Blog API: loads articles
- Blog API → Blog Model: uses model
app/api/blogs/route.js - Blog API → MongoDB Connection: connects
app/api/blogs/route.js - Citizen → Legal Resources: browses templates
README.md - Legal Resources → Resource API: loads resources
- Resource API → Resource Model: uses model
app/api/resources/route.js - Resource API → MongoDB Connection: connects
app/api/resources/route.js - Citizen → Direct Messaging: messages advocate
README.md - Direct Messaging → Message Model: stores conversations
README.md - Advocate API → User Model: uses model
app/api/users/route.js - Advocate API → MongoDB Connection: connects
app/api/users/route.js - Authentication API → User Model: uses model
app/api/auth/register/route.js - Authentication API → MongoDB Connection: connects
app/api/auth/register/route.js - Login API → User Model: uses model
app/api/auth/login/route.js - Login API → MongoDB Connection: connects
app/api/auth/login/route.js - Advocate → Advocate API: listed in directory
README.md