How biswajit-codes/visitor-management works
This is a Next.js visitor-management dashboard. The main workflow is visitor registration: a user submits the registration form, which validates the fields and calls a server action that creates a Prisma user record; the user directory and dashboard expose visitor records and counts, with delete and check-in controls shown on visitor cards. The README documents Prisma with SQLite and theme support. Some page and component relationships are visible only in the source index; check-in behavior and the underlying schema were not sampled, so their implementation links are omitted.
Main entry points: UserRegForm.tsx Registration form · prisma.ts Prisma client · UserCardUiShow.tsx Visitor card · DeleteButton.tsx Delete control
Components 23
Visitor workflow
- Registration page
src/app/user/registration/page.tsx - Registration form
src/components/Registration/UserRegForm.tsx - Registration schema
src/lib/schema.ts - Create visitor
src/server/createVisiter.ts - Visitor database
- User directory
src/app/user/page.tsx - Visitor card
src/components/UsersDetails/UserCardUiShow.tsx - Delete control
src/components/Button/DeleteButton.tsx - Delete visitor
src/server/deleteUser.ts - Check-in control
src/components/Button/CheckinButton.tsx
Dashboard and directory
- Dashboard page
src/app/page.tsx - Total users card
src/components/DashboardCard/TotalUsersCard.tsx - User count
src/server/getTotalUser.ts - Prisma client
src/lib/dbClient/prisma.ts
Application shell
- App sidebar
src/components/SideBarComp/AppSidebar.tsx - Header
src/components/Layout/Header.tsx - Theme toggle
src/components/Layout/ThemeToggleButton.tsx - Theme provider
src/components/Providers/ThemeProvider.tsx
UI foundation
- Sidebar primitives
src/components/shadcnui/sidebar.tsx - UI primitives
src/components/shadcnui - Toast UI
src/components/shadcnui/toast.tsx
Other components
- Visitor
- SQLite
Connections 22
- Visitor → Registration page: opens
src/app/user/registration/page.tsx - Registration page → Registration form: renders
src/app/user/registration/page.tsx - Registration form → Registration schema: validates with
src/components/Registration/UserRegForm.tsx - Registration form → Create visitor: submits to
src/components/Registration/UserRegForm.tsx - Create visitor → Prisma client: creates user
src/server/createVisiter.ts - Prisma client → SQLite: uses SQLite adapter
- User directory → Visitor card: renders
src/app/user/page.tsx - User directory → Prisma client: reads users
src/app/user/page.tsx - Visitor card → Delete control: renders
src/components/UsersDetails/UserCardUiShow.tsx - Visitor card → Check-in control: renders
src/components/UsersDetails/UserCardUiShow.tsx - Delete control → Delete visitor: calls
src/components/Button/DeleteButton.tsx - Delete visitor → Prisma client: deletes user
src/server/deleteUser.ts - Dashboard page → Total users card: renders
src/app/page.tsx - Total users card → User count: gets count
src/components/DashboardCard/TotalUsersCard.tsx - User count → Prisma client: counts users
src/server/getTotalUser.ts - App sidebar → Sidebar primitives: uses
src/components/SideBarComp/AppSidebar.tsx - Header → Theme toggle: renders
src/components/Layout/Header.tsx - Theme provider → Toast UI: uses
src/components/Providers/ThemeProvider.tsx - Visitor card → UI primitives: uses cards
src/components/UsersDetails/UserCardUiShow.tsx - Registration form → UI primitives: uses form controls
src/components/Registration/UserRegForm.tsx - Registration form → Toast UI: shows feedback
src/components/Registration/UserRegForm.tsx - Delete control → Toast UI: shows feedback
src/components/Button/DeleteButton.tsx