Remove large files that should not be committed: - insertr binary (19MB) - generated Go executable - test-output/ and client-dist/ - build output directories - demo-site/insertr.js - generated from lib/dist/insertr.js - internal/content/assets/*.js - embedded build artifacts - outdated integration/version control summary files - log files (server.log) Update .gitignore to exclude: - Compiled binaries (insertr, insertr.exe) - Generated assets (demo-site/insertr.js, internal/content/assets/*.js) - Build output directories (test-output/, client-dist/) - Database files (*.db) and log files (*.log) - Air temporary files Repository size reduction: ~20MB+ of unnecessary tracked files removed
1.3 KiB
1.3 KiB
AGENTS.md - Developer Guide for Insertr
Build/Test Commands
Let me handle running and building the server. I run just dev in a different terminal, so you can just test the api directly, without spinning up an instance.
just dev- Full-stack development (recommended)just build- Build entire project (Go binary + JS library)just build-lib- Build JS library onlyjust test- Run tests (placeholder, no actual tests yet)just lint- Run linting (placeholder, no actual linting yet)just air- Hot reload Go backend onlygo test ./...- Run Go tests (when available)
Code Style Guidelines
Go (Backend)
- Use standard Go formatting (
gofmt) - Package imports: stdlib → third-party → internal
- Error handling: always check and handle errors
- Naming: camelCase for local vars, PascalCase for exported
- Comments: package-level comments, exported functions documented
JavaScript (Frontend)
- ES6+ modules, no CommonJS
- camelCase for variables/functions, PascalCase for classes
- Use
const/let, avoidvar - Prefer template literals over string concatenation
- Export classes/functions explicitly, avoid default exports when multiple exports exist
Database
- Use
sqlcfor Go database code generation - SQL files in
db/queries/, schemas indb/{sqlite,postgresql}/schema.sql - Run
just sqlcafter schema changes