RSS feed reader (Rosso Reader). Go backend (backend/), Vue 3 frontend (frontend/), PostgreSQL storage.
Changes must include unit tests.
Use constants for default or constant values. Do not duplicate constants, centraize them to avoid the values becoming desynchronized.
Do not add svg images inline in templates, store them in frontend/src/components/SvgSprites.vue.
# Development (Docker, recommended)
docker compose up -d
# API: localhost:8081, Web: localhost:5173
# Backend (local)
cd backend && go build -o server ./cmd/server && ./server
# Frontend (local)
cd frontend && pnpm install && pnpm devAfter changing SQL queries in backend/sql/queries/:
cd backend && sqlc generate -f sql/sqlc.yamlOutput goes to backend/internal/db/generated/.
Tests live alongside source in *_test.go files.
| Layer | Location | Type |
|---|---|---|
| Handlers | backend/internal/handlers/ |
Unit (mockstore) |
| Middleware | backend/internal/middleware/ |
Unit |
| Scheduler | backend/internal/scheduler/ |
Unit |
| Fetcher | backend/internal/fetcher/ |
Unit (httptest) |
| OPML | backend/internal/opml/ |
Unit |
| Auth/passwords | backend/internal/auth/ |
Unit |
| Store (PG) | backend/internal/store/pgstore/ |
Integration (testcontainers) |
| Store (mock) | backend/internal/store/mockstore/ |
In-memory fake for unit tests |
# Unit tests (fast)
cd backend && go test -short ./...
# Integration tests (requires Docker)
cd backend && go test ./internal/store/pgstore/
# All tests
cd backend && go test ./...New handler/feature tests go in backend/internal/handlers/. Use mockstore.New() to create test store instances. See existing handler_test.go for test setup patterns.
Tests live in __tests__/ directories next to the code they test.
| Layer | Location |
|---|---|
| Stores | frontend/src/stores/__tests__/ |
| Components | frontend/src/components/__tests__/ |
| Composables | frontend/src/composables/__tests__/ |
| Lib utilities | frontend/src/lib/*.test.ts |
cd frontend && pnpm test # Single run
cd frontend && pnpm test:watch # Watch mode
cd frontend && pnpm coverage # With coverageUse vitest + @vue/test-utils + happy-dom. See vitest.config.ts and existing tests for patterns.
cd frontend && pnpm lint # oxlint
cd frontend && pnpm fmt:check # oxfmt check
cd frontend && pnpm fmt # oxfmt fixThe backend has no lint/format tooling configured.
- Backend: Chi router, Store interface (65 methods) with
pgstore(PostgreSQL via sqlc) andmockstore(in-memory) implementations. Dependency injection wired incmd/server/main.go. Middleware sets user on request context from session cookie. All data scoped touser_id. - Frontend: Vue 3 + Pinia (stores) + Vue Router + Tailwind CSS (dark mode via
class). API client atsrc/api/client.ts. Composable functions insrc/composables/for reusable logic. - Multi-user: Session-based auth (UUID cookie), argon2id passwords, WebAuthn passkeys. Admin user bootstrapped on first run.