A full-stack application for tracking achievements and learning progress through digital badges.
- Frontend: Vue 3 + Nuxt.js + Tailwind CSS
- Backend: Bun + Hono.js
- Shared: TypeScript for type definitions
- Testing: Bun Test for backend, Vitest for frontend
atBadges/
├── backend/ # Bun + Hono API server
│ ├── src/
│ │ ├── routes/ # API route handlers
│ │ └── index.ts # API entry point
│ └── tests/ # Backend tests
│ ├── fixtures/ # Test data
│ └── unit/ # Unit tests
├── frontend/ # Vue 3 + Nuxt frontend
│ ├── components/ # Vue components
│ ├── pages/ # Vue pages/routes
│ └── services/ # API client services
├── shared/ # Shared code between frontend/backend
│ └── types/ # TypeScript type definitions
└── scripts/ # Development and utility scripts
└── dev.sh # Run both frontend and backend servers
Make sure to install dependencies:
# Install backend dependencies
cd backend && bun install
# Install frontend dependencies
cd frontend && pnpm installRun the development servers (both frontend and backend):
# From the project root
chmod +x scripts/dev.sh
./scripts/dev.shThis script:
- Starts the backend Hono server at http://localhost:3000
- Starts the frontend Nuxt dev server at http://localhost:3001
- Enables hot reloading for both
The backend exposes the following endpoints:
GET /badges- Get all badgesGET /badges/:id- Get a single badge by IDPOST /badges- Create a new badgePUT /badges/:id- Update a badgePATCH /badges/:id/progress- Update badge progressDELETE /badges/:id- Delete a badge
The badgeService.ts provides a typed API client for interacting with the backend:
// Example usage
import { badgeService } from '@/services/badgeService';
// Get all badges
const badges = await badgeService.getBadges();
// Create a new badge
const newBadge = await badgeService.createBadge({
name: 'New Badge',
description: 'A new badge',
// ...other properties
});Run backend tests:
cd backend && bun testRun frontend tests:
cd frontend && pnpm testThis project follows an ADHD-friendly Test-Driven Development approach:
- Write small, focused tests for a specific behavior
- Implement minimal code to make tests pass
- Refactor while maintaining passing tests
For more details about our testing strategy, see .cursor/working/agent/config/testing_strategy_rule.md.