How aswin327/senm-frontend works
This is a SENM engineering-services marketplace frontend, built as a Next.js application. Users can register as clients or engineers, sign in, and access marketplace and account areas including opportunities, projects, quotes, messages, profiles, reviews, and settings. The evidenced engineer-registration flow validates details, submits professional information and completes registration through React Query hooks and API modules. The UI also has profile, portfolio, quote-building, and project-workspace capabilities. Many feature pages are present in the tree, but their runtime connections are not shown in the excerpts; those links are omitted rather than inferred.
Main entry points: index.ts API exports · page.tsx Registration entry · EngineerWizard.tsx Engineer registration · useAuth.ts Authentication state
Components 34
Web experience
- Application shell
app/layout.tsx - Navigation
components/layout/NavigationWrapper.tsx
Identity and onboarding
- Sign in
app/login/page.tsx - Authentication state
hooks/useAuth.ts - Authentication API
lib/api/auth.api.ts - Registration entry
app/register/page.tsx - Role selection
app/register/components/RoleSelect.tsx - Client registration
app/register/components/ClientForm.tsx - Engineer registration
app/register/components/EngineerWizard.tsx - Submission confirmation
app/register/components/EngineerConfirm.tsx - Registration workflow
hooks/useRegistration.ts - Registration API
lib/api/registration.api.ts
Marketplace work
- Opportunities
components/opportunities/Opportunities.tsx - Opportunity details
components/opportunities/OpportunityDetail.tsx - Projects
components/projects/Projects.tsx - Project workspace
components/projects/ProjectWorkspace.tsx - Workspace data
data/workspace.ts - Quotes
components/quotes/Quotes.tsx - Quote builder
components/quotes/QuoteBuilder.tsx - Quote builder data
data/quote-builder.ts - Messages
components/messages/Messages.tsx
Professional account
- Portfolio mutations
hooks/usePortfolio.ts - Portfolio API
lib/api/portfolio.api.ts - Profile editor
components/profile/ProfileEditor.tsx - Profile data
hooks/useProfile.ts - Profile API
lib/api/profile.api.ts - Profile reviews
components/profile/ProfileReviews.tsx - Reviews
components/reviews/Reviews.tsx - Settings
components/settings/Settings.tsx
Client data access
- API exports
lib/api/index.ts - HTTP client
lib/api/client.ts - Access token
lib/auth/token.ts - API error handling
lib/utils/error-handler.ts
Other components
- Visitor or user
Connections 38
- Visitor or user → Application shell: opens
- Application shell → Navigation: renders
app/layout.tsx - Visitor or user → Sign in: signs in
app/login/page.tsx - Sign in → Authentication state: uses
app/login/page.tsx - Authentication state → Authentication API: calls
hooks/useAuth.ts - Visitor or user → Registration entry: registers
app/register/page.tsx - Registration entry → Role selection: renders
app/register/page.tsx - Registration entry → Client registration: renders
app/register/page.tsx - Registration entry → Engineer registration: renders
app/register/page.tsx - Registration entry → Submission confirmation: renders
app/register/page.tsx - Engineer registration → Authentication state: uses
app/register/components/EngineerWizard.tsx - Engineer registration → Registration workflow: submits through
app/register/components/EngineerWizard.tsx - Engineer registration → Portfolio mutations: uses
app/register/components/EngineerWizard.tsx - Registration workflow → Registration API: calls
hooks/useRegistration.ts - Portfolio mutations → Portfolio API: calls
hooks/usePortfolio.ts - Visitor or user → Opportunities: browses
- Visitor or user → Projects: views
- Visitor or user → Project workspace: opens
- Project workspace → Workspace data: reads
components/projects/ProjectWorkspace.tsx - Visitor or user → Quotes: views
- Visitor or user → Quote builder: builds quote
- Quote builder → Quote builder data: reads
components/quotes/QuoteBuilder.tsx - Visitor or user → Messages: opens
- Visitor or user → Profile editor: edits profile
- Profile editor → Profile data: uses
- Profile data → Profile API: calls
hooks/useProfile.ts - Visitor or user → Profile reviews: views
- Visitor or user → Reviews: views
- Visitor or user → Settings: opens
- Authentication state → API exports: imports
hooks/useAuth.ts - Registration workflow → API exports: imports
hooks/useRegistration.ts - Portfolio mutations → API exports: imports
hooks/usePortfolio.ts - API exports → Authentication API: exports
lib/api/index.ts - API exports → Registration API: exports
lib/api/index.ts - API exports → Portfolio API: exports
lib/api/index.ts - API exports → Profile API: exports
lib/api/index.ts - Authentication API → HTTP client: uses
lib/api/auth.api.ts - HTTP client → Access token: reads and updates
lib/api/client.ts