Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a full-stack notes application with:
mynotes/ ├── backend/ # NestJS backend application │ ├── src/ # Source code (controllers, services, modules) │ └── test/ # E2E and unit tests ├── frontend/ # Angular frontend application │ └── src/ # Source code (components, services, routes) └── package.json # Root package (contains Angular CLI)
Navigate to
backend/ directory for all backend operations:
cd backend # Install dependencies npm install # Development npm run start:dev # Watch mode with auto-reload npm run start:debug # Debug mode with watch # Build npm run build # Compile TypeScript to dist/ # Production npm run start:prod # Run compiled code from dist/ # Testing npm run test # Unit tests (Jest) npm run test:watch # Unit tests in watch mode npm run test:cov # Unit tests with coverage npm run test:e2e # End-to-end tests # Code Quality npm run lint # ESLint with auto-fix npm run format # Prettier formatting
Navigate to
frontend/ directory for all frontend operations:
cd frontend # Install dependencies npm install # Development npm start # Start dev server (default: http://localhost:4200) # Build npm run build # Production build to dist/frontend npm run watch # Development build with watch mode # Testing npm test # Karma unit tests
src/main.ts bootstraps the NestJS applicationsrc/app.module.tssrc/app/app.routes.tssrc/app/app.config.ts provides application-wide providersapp (defined in angular.json)The application uses Angular environment files for configuration across different deployment scenarios:
Located in
frontend/src/environments/:
- Default (local development)environment.ts
http://localhost:3000npm start
- Docker developmentenvironment.docker.ts
http://localhost:11002angular.json with --configuration=docker
- Productionenvironment.production.ts
/api (relative URL)Local Development:
cd frontend npm start # Uses environment.ts (backend on localhost:3000)
Docker Development:
docker compose up -d # Uses environment.docker.ts (backend on localhost:11002)
Production Build:
cd frontend npm run build # Uses environment.production.ts (relative /api URL)
To add configuration values:
import { environment } from '../environments/environment'environment.yourPropertyThe application supports dual-mode authentication for flexible development:
Local Mode (Default for Development)
https://mhylle.com/api/authAUTH_MODE=local in environmentProduction Mode
AUTH_MODE=production in environmentBackend Environment Variables (
.env):
AUTH_MODE=local # 'local' or 'production' AUTH_SERVICE_URL=https://mhylle.com/api/auth # External auth service URL JWT_SECRET=your-secret-key-change-in-production
The backend uses a factory provider pattern to switch between auth services:
LocalAuthService - Proxies requests to external auth serviceProductionAuthService - Handles auth locally with databaseIAuthService interface for consistencyBy default, the application allows guest usage - no login required:
test/jest-e2e.json)*.spec.ts naming convention for both projectsThe project includes three Docker services:
# Start all services (database + backend + frontend) docker compose up -d # Start only the database (for local development) docker compose up -d postgres # View logs docker compose logs -f [service_name] # Stop all services docker compose down # Stop all services and remove volumes (deletes database data) docker compose down -v # Rebuild services after Dockerfile changes docker compose up -d --build # Check service status docker compose ps
Run everything in Docker:
docker compose up -d
Access:
Run only the database in Docker, develop backend and frontend locally:
# Start database only docker compose up -d postgres # In separate terminals: cd backend && npm run start:dev # Backend on port 3000 cd frontend && npm start # Frontend on port 4200
For local development, backend connects to database at
localhost:11003.
Copy backend/.env.example to backend/.env and adjust settings if needed.
Run database and backend in Docker, frontend locally:
docker compose up -d postgres backend cd frontend && npm start
PostgreSQL with pgvector:
pgvector/pgvector:pg17mynotesmynotes_usermynotes_passworddocker/init-db.sql)Connecting to the database:
# From host machine psql -h localhost -p 11003 -U mynotes_user -d mynotes # From within Docker network psql -h postgres -p 5432 -U mynotes_user -d mynotes
Backend (
backend/.env for local development):
NODE_ENV: developmentPORT: 3000DATABASE_HOST: localhost (or postgres in Docker)DATABASE_PORT: 11003 (or 5432 in Docker)DATABASE_NAME: mynotesDATABASE_USER: mynotes_userDATABASE_PASSWORD: mynotes_passwordBackend is configured to accept requests from:
postgres_data persists data between container restartspgvector extension is automatically enabled on first database initializationdocker compose down -v to completely reset the database