Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Issue Tracker

A modern, full-stack issue tracking application built with React, Fastify, and SQLite.

Features

  • πŸ” Authentication - Secure user authentication with BetterAuth
  • πŸ“ Issue Management - Create, read, update, and delete issues
  • 🏷️ Tag System - Organize issues with customizable tags
  • πŸ” Advanced Filtering - Filter by status, priority, assignee, tags, and search
  • πŸ‘₯ User Management - Assign issues to team members
  • πŸ“± Responsive Design - Works great on desktop and mobile
  • ⚑ Fast & Modern - Built with modern web technologies

Tech Stack

Backend

  • Fastify - High-performance Node.js web framework
  • SQLite - Lightweight, embedded database
  • BetterAuth - Modern authentication library
  • TypeScript - Type-safe JavaScript

Frontend

  • React 18 - Modern React with hooks
  • Vite - Fast build tool and dev server
  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - Beautiful, accessible components
  • TypeScript - Type-safe JavaScript

Project Structure

β”œβ”€β”€ backend/          # Fastify API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── index.ts  # Main server file
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”œβ”€β”€ frontend/         # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.tsx
β”‚   β”‚   β”œβ”€β”€ main.tsx
β”‚   β”‚   └── lib/
β”‚   β”‚       └── utils.ts
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
└── package.json      # Root workspace configuration

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Git

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd issues
  2. Set up the backend

    cd backend
    npm install
    
    # Copy environment template and configure
    cp .env.template .env
    # Edit .env with your settings
    
    # Run database migrations
    npm run migrate
    
    # Seed with sample data (optional)
    npm run seed
  3. Set up the frontend

    cd ../frontend
    npm install
    
    # Copy environment template and configure
    cp .env.template .env
    # Edit .env with your settings
  4. Start the development servers

    From the project root:

    npm run dev

    Or start individually:

    # Backend (in backend/ directory)
    npm run dev
    
    # Frontend (in frontend/ directory)
    npm run dev
  5. Access the application

Environment Configuration

Backend (.env)

DATABASE_PATH=database.sqlite
BETTER_AUTH_SECRET=your-super-secret-auth-key-change-this-in-production
BETTER_AUTH_BASE_URL=http://localhost:3000
PORT=3000
HOST=0.0.0.0
NODE_ENV=development
FRONTEND_URL=http://localhost:5173
LOG_LEVEL=info

Frontend (.env)

VITE_API_URL=http://localhost:3000/api
VITE_NODE_ENV=development

Available Scripts

Root Scripts

  • npm run dev - Start both frontend and backend in development mode
  • npm run build - Build both frontend and backend for production
  • npm run test - Run all tests (frontend + backend)

Backend Scripts

  • npm run dev - Start development server with hot reload
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run test - Run test suite
  • npm run test:watch - Run tests in watch mode
  • npm run migrate - Run database migrations
  • npm run seed - Seed database with sample data

Frontend Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run test - Run test suite
  • npm run lint - Run ESLint

API Documentation

Authentication Endpoints

  • POST /api/auth/sign-up/email - User registration
  • POST /api/auth/sign-in/email - User login
  • POST /api/auth/sign-out - User logout
  • GET /api/auth/get-session - Get current user session

Issues API

  • GET /api/issues - List issues with filtering and pagination
  • POST /api/issues - Create new issue
  • GET /api/issues/:id - Get issue by ID
  • PUT /api/issues/:id - Update issue
  • DELETE /api/issues/:id - Delete issue

Tags API

  • GET /api/tags - List all tags
  • POST /api/tags - Create new tag
  • DELETE /api/tags/:id - Delete tag

Users API

  • GET /api/users - List users (for assignment)

Health Check

  • GET /health - Application health status
  • GET /health/ready - Readiness probe
  • GET /health/live - Liveness probe

Testing

Run the comprehensive test suite:

# All tests
npm run test

# Backend tests only
cd backend && npm test

# Frontend tests only
cd frontend && npm test

# Watch mode
npm run test:watch

Test Coverage

  • Backend: 85 tests covering CRUD operations, authentication, filtering, error scenarios
  • Frontend: 15 tests covering responsive design and component behavior

Sample Users:

  • john@example.com / password123
  • jane@example.com / password123
  • admin@example.com / admin123
  • dev@example.com / dev123

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please open an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages