CLAUDE.md
Guides Claude Code on the architecture, commands, and API endpoints for a Go + Angular anonymous note board project.
What this file does
Guides Claude Code on the architecture, commands, and API endpoints for a Go + Angular anonymous note board project.
When to use it
- You want Claude to understand a two-tier Go/Angular project structure
- You need Claude to run frontend or backend dev commands from the correct directories
- You want Claude to know the database setup and connection defaults
- You need Claude to call or debug the REST API endpoints
Assumes this stack
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Noted is a modern, simplistic board where anyone can anonymously post text notes. It consists of a Go REST API backend and an Angular frontend client.
Architecture
Backend (Go):
- Clean architecture with layered structure: controller → service → repository → database
- PostgreSQL database with a simple
notetable (id, text) - REST API endpoints at
/api/note/*for CRUD operations - CORS enabled for frontend communication on
http://localhost:4200 - Server runs on
localhost:8888
Frontend (Angular 17):
- Standard Angular CLI project structure
- Services for API communication (
api.service.ts,note.service.ts) - Home component for displaying notes
- TypeScript with strict configuration
Data Flow:
- Angular frontend makes HTTP requests to Go backend
- Go controllers handle requests and delegate to services
- Services contain business logic and call repositories
- Repositories interact with PostgreSQL database
- Response flows back through the layers
Development Commands
Frontend (run from /client directory):
npm run start # Start dev server on localhost:4200
npm run build # Build for production
npm run test # Run unit tests with Karma
ng generate component component-name # Generate new component
Backend (run from /server directory):
go run main.go # Start server on localhost:8888
go mod tidy # Clean up dependencies
Database Setup:
- Create PostgreSQL database named
noted_dev - Run
/server/sql/note_table.sqlto create the note table - Default connection:
postgres:password@localhost:5432/noted_dev - Configure database connection in
/server/config/database.go
Key Directories
/client/src/app/- Angular components and services/client/src/types.ts- TypeScript interfaces (Note, NotesResponse, Options)/server/controller/- HTTP request handlers/server/service/- Business logic layer/server/repository/- Database access layer/server/model/- Data structures/server/data/- Request/response DTOs/server/helper/- Utility functions (JSON, error handling)/server/config/- Database configuration
API Endpoints
GET /api/note- Get all notesGET /api/note/:noteId- Get note by IDPOST /api/note- Create new notePATCH /api/note/:noteId- Update noteDELETE /api/note/:noteId- Delete note
What's inside
Project overview, architecture description, 6 development commands, 10 key directories, 5 API endpoints.
Change this for your project
- Replace
noted_devwith your own PostgreSQL database name - Replace
postgres:password@localhost:5432/noted_devwith your own database connection string - Replace
http://localhost:4200with your frontend's actual origin
Where it goes
Save as CLAUDE.md in your repository root. Claude Code reads it automatically at the start of every session.
Worth borrowing
- Layered backend structure (controller → service → repository → database) for clean separation of concerns
- Separate directory-level commands for frontend and backend to avoid running commands in the wrong folder
Related Documents
Code indexing for AI agents: summarization strategies and evaluation systems
Synthesises 2024-2025 research on code indexing for AI agents, covering summarisation strategies, hybrid retrieval architectures, and evaluation benchmarks.
write-script
Guides an AI through writing a YouTube video script with strict structural, language, and quiz rules for a survival channel.
Claude AI Git Workflow Integration
Recommends using the git-ai-commit CLI tool for AI-generated commit messages instead of manual ones.
Missing Business Agents Research — FLUXION 2026
Identifies 12 missing business operations agents for an indie software company and ranks them by impact and effort with €0 implementation plans.