A full-stack bug tracking application built with Go (backend) and Next.js (frontend). The application allows users to create, read, update, and delete bug reports, with support for comments and priority levels.
Features
- Create and manage bug reports
- Add comments to bugs
- Set priority levels and status
- Real-time updates
- Responsive design
- Comprehensive test coverage (unit, API, E2E, and performance tests)
Prerequisites
Before running the application, ensure you have the following installed:
- Node.js (v20 or later)
- Go (v1.21 or later)
- Docker and Docker Compose
- Git
Quick Start with Docker Compose
The easiest way to run the application is using Docker Compose:
# Clone the repository git clone https://github.com/james-willett/bug-tracker.git cd bug-tracker # Launch the application docker compose up --build
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
Manual Setup
Backend
cd bugtracker-backend # Install dependencies go mod download # Run the application go run cmd/bugtracker/main.go
The backend API will be available at http://localhost:8080
Frontend
cd bugtracker-frontend # Install dependencies npm install # Run the development server npm run dev
The frontend will be available at http://localhost:3000
Running Tests
The project includes several types of tests:
Backend Unit Tests
cd bugtracker-backend go test ./... -v
Frontend Unit Tests
cd bugtracker-frontend npm test
API Tests
cd tests-api
npm install
npm run test:localE2E Tests
cd tests-e2e npm install npx playwright test
Performance Tests
First, install K6:
# MacOS brew install k6 # Windows winget install k6 # Linux For Linux installation instructions, please refer to the [official K6 installation guide](https://k6.io/docs/getting-started/installation#linux)
Then run the tests:
cd tests-perf
k6 run script.jsProject Structure
bugtracker-backend/- Go backend applicationbugtracker-frontend/- Next.js frontend applicationtests-api/- API tests using Playwrighttests-e2e/- End-to-end tests using Playwrighttests-perf/- Performance tests using K6jenkins/- Contains Jenkins pipeline configurations
Jenkins CI/CD
The project includes Jenkins pipelines located in the jenkins/ folder for continuous integration and deployment.
To start Jenkins locally using Docker Compose:
cd jenkins
docker-compose up --buildJenkins will then be available at http://localhost:9000.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details