TickPath is a modern, full-stack ticketing system built with React and TypeScript. It provides a comprehensive solution for issue tracking, user management, and project organization with real-time collaboration features.
- React 19 - UI library with latest features
- TypeScript - Type-safe JavaScript
- TanStack Router - Type-safe routing with file-based routing
- TanStack Start - Full-stack React framework
- TanStack Query - Server state management
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Re-usable component library
- Lucide React - Beautiful icons
- Sonner - Toast notifications
- ORPC - Type-safe API layer
- Drizzle ORM - Type-safe SQL ORM
- MySQL - Relational database
- Better Auth - Authentication solution
- Vite - Build tool and development server
- pnpm - Fast, disk space efficient package manager
- Docker - Containerization for database
- @t3-oss/env-core - Environment variable validation
tickpath/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── issue/ # Issue-specific components
│ │ ├── layout/ # Layout components
│ │ └── ui/ # shadcn/ui components
│ ├── db/ # Database related files
│ │ ├── schema.ts # Database schema definitions
│ │ ├── db.ts # Database connection
│ │ ├── drizzle.config.ts # Drizzle configuration
│ │ └── seed.ts # Database seeding
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility libraries
│ │ ├── auth.ts # Authentication configuration
│ │ ├── env.ts # Environment variables
│ │ ├── theme.ts # Theme management
│ │ └── utils.ts # Utility functions
│ ├── orpc/ # API layer
│ │ ├── router.ts # API route definitions
│ │ └── react-query.ts # Query client setup
│ ├── routes/ # File-based routes
│ │ ├── __root.tsx # Root layout
│ │ ├── index.tsx # Home page
│ │ └── api/ # API routes
│ ├── styles/ # Global styles
│ └── routeTree.gen.ts # Generated route tree
├── docker-compose.yml # Docker services
├── package.json # Dependencies and scripts
├── vite.config.ts # Vite configuration
└── tsconfig.json # TypeScript configuration
src/components/
- Contains all reusable React componentsissue/
- Components specific to issue management (assignee selector, status icons, etc.)layout/
- Application layout components (sidebar, navigation)ui/
- Base UI components from shadcn/ui
src/db/
- Database layer with Drizzle ORMsrc/routes/
- File-based routing structuresrc/orpc/
- Type-safe API layer using ORPC
- ✅ Create, read, update, and delete issues
- ✅ Issue status management (e.g., Todo, In Progress, Done)
- ✅ Priority levels (e.g., Low, Medium, High, Critical)
- ✅ Label/tag system for categorization
- ✅ User assignment and reassignment
- ✅ Issue descriptions and titles
- ✅ User authentication and authorization
- ✅ Role-based access control
- ✅ User presence indicators (online, away, offline)
- ✅ User profiles with avatars
- ✅ Live user presence status
- ✅ Real-time updates via TanStack Query
- ✅ Dark/light theme support
- ✅ Responsive design
- ✅ Toast notifications
- ✅ Loading states and error handling
- ✅ Type-safe navigation
Before you begin, ensure you have the following installed:
- Node.js (version 18 or higher)
- pnpm (recommended package manager)
- Docker (for running MySQL database)
- Git
git clone <your-repository-url>
cd tickpath
pnpm install
Create a .env
file in the root directory:
cp .env.example .env
Configure the following environment variables:
# Database
DATABASE_URL="mysql://root:root_password@localhost:3306/demo"
# Authentication
BETTER_AUTH_URL="http://localhost:3000"
BETTER_AUTH_SECRET="your-secret-key-min-10-chars"
Run MySQL using Docker:
docker-compose up -d
This will start a MySQL database on port 3306 with:
- Database:
demo
- Username:
root
- Password:
root_password
Push the database schema:
pnpm run db:push
Seed the database with initial data:
pnpm run db:seed
pnpm run dev
The application will be available at http://localhost:3000
pnpm run dev
- Start development serverpnpm run build
- Build for production
pnpm run db:push
- Push schema changes to databasepnpm run db:generate
- Generate migration filespnpm run db:reset
- Reset database schemapnpm run db:studio
- Open Drizzle Studio (database GUI)pnpm run db:seed
- Seed database with sample data
pnpm run auth:generate
- Generate Better Auth files
The application uses the following main entities:
- Users - User accounts with authentication
- Issues - Main ticketing entities
- Statuses - Issue status types (Todo, In Progress, Done, etc.)
- Priorities - Issue priority levels
- Labels - Categorization tags for issues
- Sessions - User authentication sessions
- Accounts - OAuth account linking
- User Presence - Real-time user status
- User Roles - Role-based permissions
- Issues belong to statuses and priorities
- Issues can be assigned to users
- Issues can have multiple labels (many-to-many)
- Users can have multiple roles (many-to-many)
The project uses shadcn/ui components which provide:
- Consistent design system
- Accessibility features
- Dark/light theme support
- Customizable styling with Tailwind CSS
Key components include:
Button
,Input
,Dialog
- Basic form elementsSidebar
,Sheet
- Layout componentsAvatar
,Badge
- User interface elementsCommand
,Popover
- Interactive components
vite.config.ts
- Vite bundler configuration with TanStack Starttsconfig.json
- TypeScript compiler optionscomponents.json
- shadcn/ui component configurationtailwind.config.ts
- Tailwind CSS configuration (if exists)
src/db/drizzle.config.ts
- Drizzle ORM configurationdocker-compose.yml
- MySQL database container setup
The application uses Better Auth for authentication, which provides:
- Session-based authentication
- OAuth provider support
- Email verification
- Password reset functionality
- Role-based access control
Authentication configuration is located in src/lib/auth.ts
.
The application uses ORPC for type-safe API routes:
- Issues - CRUD operations for issues
- Statuses - Retrieve all issue statuses
- Priorities - Retrieve all priority levels
- Labels - Retrieve all labels
- Users - User management with presence status
API routes are defined in src/orpc/router.ts
and automatically provide:
- Full TypeScript type safety
- Input validation with Zod
- Automatic serialization
- Use TypeScript for all new code
- Follow the established folder structure
- Components should be small and focused
- Use custom hooks for reusable logic
- Use Drizzle ORM for all database operations
- Define relationships in schema files
- Use migrations for schema changes
- Always validate input with Zod schemas
- Use file-based routing (TanStack Router)
- Define loaders for data fetching
- Use type-safe navigation
- Implement proper error boundaries
- Use Tailwind CSS for styling
- Leverage shadcn/ui components
- Maintain design system consistency
- Support dark/light themes
pnpm run build
Ensure all environment variables are properly set in your production environment:
DATABASE_URL
- Production database connectionBETTER_AUTH_URL
- Production app URLBETTER_AUTH_SECRET
- Secure secret key
Before deploying, ensure your database schema is up to date:
pnpm run db:push
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- TanStack Router Documentation
- TanStack Start Documentation
- Drizzle ORM Documentation
- Better Auth Documentation
- shadcn/ui Documentation
- ORPC Documentation
This project is licensed under the ISC License.