A modern, full-stack issue tracking application built with Next.js 15, featuring real-time updates, advanced filtering, multiple view modes, and comprehensive user management.
- Google OAuth Integration via NextAuth.js
- JWT-based Sessions with automatic refresh
- Role-based Access Control with user assignment capabilities
- Secure API Routes with session validation
- Real-time Issue Statistics with visual charts
- Interactive Charts powered by Recharts
- Latest Issues Overview with assignee information
- Responsive Grid Layout for optimal viewing
- Create, Read, Update, Delete operations
- Status Tracking (Open, In Progress, Closed)
- User Assignment with avatar display
- Rich Text Editor using SimpleMDE with Markdown support
- Advanced Search & Filtering with real-time results
- Bulk Operations and batch processing
- π Table View - Traditional spreadsheet-style layout
- π Kanban Board - Drag-and-drop visual workflow
- π± Virtualized List - High-performance rendering for large datasets
- Virtual Scrolling for handling thousands of issues
- Infinite Loading with React Query
- Server-side Pagination with client-side caching
- Optimistic Updates for instant UI feedback
- Image Optimization with Next.js Image component
- Real-time Search across title and description
- Status-based Filtering with quick filters
- Sorting Options by date, title, status, and assignee
- URL State Management for shareable filtered views
- Debounced Search to prevent API spam
- Mobile-first Approach with Tailwind CSS
- Adaptive Layouts for all screen sizes
- Touch-friendly Interactions on mobile devices
- Progressive Web App capabilities
- TypeScript for type safety
- ESLint & Prettier for code quality
- Prisma ORM with type-safe database queries
- Zod Validation for runtime type checking
- Error Monitoring with Sentry integration
- Hot Reload development with Turbopack
- Node.js 18.0 or later
- npm or yarn package manager
- MongoDB database (local or cloud)
- Google OAuth credentials for authentication
-
Clone the repository
git clone <repository-url> cd issue-tracker
-
Install dependencies
npm install # or yarn install
-
Environment Setup
Create a
.env.local
file in the root directory:# Database DATABASE_URL="mongodb+srv://username:password@cluster.mongodb.net/issue-tracker" # NextAuth.js NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-nextauth-secret-here" # Google OAuth GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # Sentry (Optional) SENTRY_DSN="your-sentry-dsn"
-
Database Setup
# Generate Prisma client npx prisma generate # Push database schema npx prisma db push # Seed the database with sample data npm run seed
-
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
issue-tracker/
βββ prisma/ # Database schema and migrations
β βββ schema.prisma # Prisma schema definition
β βββ seed.js # Database seeding script
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js app directory
β β βββ api/ # API routes
β β β βββ auth/ # Authentication endpoints
β β β βββ issues/ # Issue CRUD operations
β β β βββ users/ # User management
β β βββ auth/ # Authentication configuration
β β βββ issues/ # Issue management pages
β β β βββ list/ # Issue listing with filters
β β β βββ new/ # Create new issue
β β β βββ [id]/ # Individual issue pages
β β βββ providers/ # React context providers
β β βββ layout.tsx # Root layout component
β βββ components/ # Reusable UI components
β β βββ KanbanBoard.tsx # Kanban view component
β β βββ EnhancedIssuesView.tsx # Multi-view container
β β βββ VirtualizedIssuesList.tsx # Performance-optimized list
β β βββ SearchInput.tsx # Search functionality
β β βββ StatusBadge.tsx # Status indicators
β β βββ ...
β βββ hooks/ # Custom React hooks
β β βββ useInfiniteIssues.ts # Infinite loading logic
β β βββ useIssueActions.ts # Issue operations
β βββ lib/ # Utility libraries
β β βββ prisma.ts # Database client
β β βββ validationSchema.ts # Zod schemas
β βββ services/ # API service layer
β βββ apiService.ts # HTTP client configuration
βββ .env.local # Environment variables
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project dependencies
The application uses Prisma as the ORM with MongoDB as the database. The schema includes:
- Users - Authentication and profile management
- Issues - Core issue tracking entity
- Accounts/Sessions - NextAuth.js authentication tables
-
Google OAuth Setup:
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
-
NextAuth Secret:
# Generate a secure secret openssl rand -base64 32
For error monitoring and performance tracking:
- Create account at Sentry.io
- Create new project for Next.js
- Copy DSN to environment variables
- Sentry is pre-configured in
next.config.ts
Retrieve issues with filtering and pagination
Query Parameters:
page
- Page number (default: 1)pageSize
- Items per page (default: 10)status
- Filter by status (OPEN, IN_PROGRESS, CLOSED)search
- Search in title and descriptionorderBy
- Sort field (createdAt, title, status)orderDirection
- Sort direction (asc, desc)
Response:
{
"issues": [...],
"totalCount": 150,
"page": 1,
"pageSize": 10,
"totalPages": 15
}
Create a new issue
Body:
{
"title": "Issue title",
"description": "Detailed description in Markdown"
}
Retrieve specific issue with assignee information
Update issue details
Body:
{
"title": "Updated title",
"description": "Updated description",
"assignedUserId": "user-id-or-null"
}
Delete an issue (requires authentication)
Retrieve all users for assignment dropdown
The application uses Tailwind CSS with Radix UI components:
- Colors: Modify
tailwind.config.ts
for custom color scheme - Typography: Geist Sans and Geist Mono fonts are pre-configured
- Components: Radix UI provides accessible, unstyled components
- Theme: Light theme with violet accent color
-
Update
prisma/schema.prisma
:enum Status { OPEN IN_PROGRESS CLOSED BLOCKED // Add new status }
-
Update
src/constants/statuses.ts
with new status configuration -
Run database migration:
npx prisma db push
# Development server with Turbopack
npm run dev
# Production build
npm run build
# Start production server
npm start
# Run linting
npm run lint
# Seed database with sample data
npm run seed
# Database operations
npx prisma studio # Database GUI
npx prisma db push # Push schema changes
npx prisma generate # Generate client
- ESLint: Configured with Next.js recommended rules
- TypeScript: Strict mode enabled for type safety
- Prettier: Auto-formatting on save (configure in your editor)
- Husky: Git hooks for pre-commit checks (optional)
- React Query DevTools: Available in development
- Next.js Bundle Analyzer: Run
ANALYZE=true npm run build
- Sentry Performance: Automatic performance monitoring
- Chrome DevTools: Built-in performance profiling
-
Connect Repository:
- Import project to Vercel
- Connect your Git repository
-
Environment Variables:
- Add all environment variables from
.env.local
- Update
NEXTAUTH_URL
to your production domain
- Add all environment variables from
-
Deploy:
- Automatic deployments on Git push
- Preview deployments for pull requests
The application can be deployed to any platform supporting Node.js:
- Netlify
- Railway
- Digital Ocean App Platform
- AWS Amplify
- Heroku
Create Dockerfile
:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Run tests and linting:
npm run lint
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- TypeScript: Use proper typing, avoid
any
- Components: Use functional components with hooks
- Styling: Use Tailwind CSS classes
- API: Follow REST conventions
- Database: Use Prisma for all database operations
Follow Conventional Commits:
feat: add new issue filter by assignee
fix: resolve pagination bug on mobile
docs: update API documentation
style: improve button hover states
1. Database Connection Failed
# Check MongoDB connection string
# Ensure database is running
# Verify network access (whitelist IP for cloud MongoDB)
2. Google OAuth Not Working
# Verify GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
# Check authorized redirect URIs in Google Cloud Console
# Ensure NEXTAUTH_URL matches your domain
3. Prisma Client Errors
# Regenerate Prisma client
npx prisma generate
# Reset database (caution: loses data)
npx prisma db push --force-reset
4. Build Errors
# Clear Next.js cache
rm -rf .next
# Clear node_modules
rm -rf node_modules package-lock.json
npm install
- Issues: Create an issue on GitHub
- Discussions: Use GitHub Discussions for questions
- Documentation: Check Next.js and Prisma docs
- Community: Join relevant Discord servers
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team - Amazing React framework
- Vercel - Hosting and deployment platform
- Prisma Team - Excellent database toolkit
- Radix UI - Accessible component primitives
- Tailwind CSS - Utility-first CSS framework
- React Query - Powerful data synchronization
- Lines of Code: ~15,000
- Components: 25+
- API Endpoints: 8
- Database Tables: 5
- Third-party Integrations: 3
Built with β€οΈ using modern web technologies. Star β this repo if you find it helpful!