How angelvilla16/mytickets works
MyTickets is a Next.js work-ticket management app. Users register or log in, then access protected dashboard views to browse filtered tickets, view their own tickets, and see team members; ticket actions create, assign, update, and delete records. The main layers are page routes, reusable UI, server actions/API handlers, and the MySQL query helper. The graph preserves README-documented authentication and ticket capabilities, while some action-to-database links are supported by the source index rather than excerpts; unsampled details are not inferred.
Main entry points: db.ts MySQL query helper · page.tsx Support dashboard · Cards.tsx Ticket cards · Navbar.tsx Navigation bar
Components 27
Authentication
- Login page
app/page.tsx - Login form
components/FormLogin.tsx - Login endpoint
app/api/auth/login/route.ts - Registration page
app/register/page.tsx - Registration form
components/SigninForm.tsx - Registration endpoint
app/api/auth/register/route.ts - Route protection
middleware.ts - Logout action
app/actions/auth.ts
Ticket workflows
- Support dashboard
app/dashboard/page.tsx - Status filter
components/FilterWrapper.tsx - Ticket table
components/DashboardTable.tsx - My tickets view
app/dashboard/tickets/page.tsx - Ticket cards
components/ui/Cards.tsx - Create ticket modal
components/ui/ModalTicket.tsx - Create action
app/actions/CrearTicket.ts - Assignment modal
components/ui/ModalAsignar.tsx - Assignment action
app/actions/asignar.ts - Status updater
components/ui/TicketStatusUpdater.tsx - Update action
app/actions/update.ts - Delete action
app/actions/delete.ts
Team directory
- Team members page
app/dashboard/agentes/page.tsx - Agent cards
components/AgentCards.tsx
Shared services and UI
- Navigation bar
components/Navbar.tsx - Side navigation
components/Sidebar.tsx - MySQL query helper
lib/db.ts
Other components
- User
- MySQL database
Connections 32
- User → Login page: opens
README.md - Login page → Login form: renders
app/page.tsx - Login form → Login endpoint: submits login
README.md - User → Registration page: opens
README.md - Registration page → Registration form: renders
app/register/page.tsx - Registration form → Registration endpoint: posts registration
components/SigninForm.tsx - Login endpoint → MySQL query helper: queries users
app/api/auth/login/route.ts - Registration endpoint → MySQL query helper: inserts user
app/api/auth/register/route.ts - Route protection → Support dashboard: protects routes
README.md - Support dashboard → Navigation bar: renders
app/dashboard/page.tsx - Support dashboard → Side navigation: renders
app/dashboard/page.tsx - Support dashboard → Status filter: renders
app/dashboard/page.tsx - Support dashboard → Ticket table: renders filtered
app/dashboard/page.tsx - Status filter → Ticket table: sets filter
app/dashboard/page.tsx - Ticket table → MySQL query helper: queries tickets
components/DashboardTable.tsx - My tickets view → MySQL query helper: reads own tickets
app/dashboard/tickets/page.tsx - My tickets view → Ticket cards: renders cards
app/dashboard/tickets/page.tsx - Ticket cards → Delete action: uses delete
components/ui/Cards.tsx - Ticket cards → Status updater: renders updater
components/ui/Cards.tsx - Status updater → Update action: submits update
components/ui/TicketStatusUpdater.tsx - Navigation bar → Create ticket modal: opens modal
components/Navbar.tsx - Create ticket modal → Create action: submits ticket
components/ui/ModalTicket.tsx - Navigation bar → Assignment modal: renders assignment
components/Navbar.tsx - Assignment modal → Assignment action: submits assignment
components/ui/ModalAsignar.tsx - Create action → MySQL query helper: writes ticket
app/actions/CrearTicket.ts - Assignment action → MySQL query helper: updates assignment
app/actions/asignar.ts - Update action → MySQL query helper: updates ticket
app/actions/update.ts - Delete action → MySQL query helper: deletes ticket
app/actions/delete.ts - Team members page → MySQL query helper: queries users
app/dashboard/agentes/page.tsx - Team members page → Agent cards: renders cards
app/dashboard/agentes/page.tsx - Side navigation → Logout action: invokes logout
components/Sidebar.tsx - MySQL query helper → MySQL database: executes queries
README.md