How anuradha-harshana/stagen works
STAGEN is a Next.js frontend for a construction platform connecting builders and customers. The visible user workflow is account registration or sign-in, followed by role-oriented company, customer, trade, and web-admin areas. Registration currently validates form data and logs it locally; the sampled code shows no authentication service, persistence, or protected-area behavior. The README is a generic Next.js starter, and the protected areas are represented only by layouts in the available tree.
Main entry points: RegisterForm.tsx Registration form · login/page.tsx Login page · register/page.tsx Registration page · LoginForm.tsx Login form
Components 14
Account access
- Login page
app/login/page.tsx - Login form
components/ui/LoginForm.tsx - Registration page
app/(auth)/register/page.tsx - Registration form
components/ui/RegisterForm.tsx - Registration validation
lib/validation.ts
Role workspaces
- Company admin
app/(protected)/company-admin/layout.tsx - Company management
app/(protected)/company-management/layout.tsx - Customer area
app/(protected)/customer/layout.tsx - Trades area
app/(protected)/trades/layout.tsx - Web admin
app/(protected)/web-admin/layout.tsx
Application shell
- Home route
app/page.tsx - Root layout
app/layout.tsx - User role types
lib/types/types.ts
Other components
- Visitor
Connections 8
- Visitor → Home route: opens
- Visitor → Login page: opens
- Visitor → Registration page: opens
- Login page → Login form: renders
- Registration page → Registration form: renders
- Registration form → Registration validation: validates with
- Registration form → Login page: links to
- Login form → Registration page: links to