A modern REST API for managing scenic view collections built with Express.js and TypeScript.
Lofty Views API is a backend service for managing and sharing scenic view collections. Users can create, browse, and interact with view entries that represent beautiful locations with images, descriptions, and community engagement through "hearts".
This API enables:
- 🏞️ View Management: Create and manage scenic view entries with rich metadata
- 👥 User System: Full user lifecycle management with secure authentication patterns
- ❤️ Community Features: Heart/like system for popular views
- 📍 Location Data: Geographic information for each view
- 🔍 Discovery: Browse and search through view collections
- Views Management
GET /lofty-views- List all scenic viewsGET /lofty-views/:id- Get specific view detailsPOST /lofty-views- Create new view entries
- User Management
GET /users- List usersGET /users/:id- Get user detailsPOST /users- Create new usersDELETE /users/:id- Remove users
- 🏗️ Clean Architecture: Feature-based organization with layered design
- 🔒 Security First: Helmet, CORS, and rate limiting built-in
- ✅ Type Safety: Full TypeScript with Zod validation
- 📊 Observability: Structured logging with Pino
- 🧪 Testing: Comprehensive test suite with Vitest
- 📝 Documentation: Interactive API docs with Swagger UI
- 🐳 Containerized: Docker-ready for easy deployment
- Clone the repository
- Navigate to project directory
- Install dependencies:
pnpm install
- Create
.env: Copy.env.templateto.env - Update
.env: Fill in necessary environment variables
For seamless AI agent collaboration, install persistproc:
# Install persistproc for process management
pipx install persistproc
# Start the persistproc server (in a dedicated terminal)
persistproc serveWith AI Agent Support (Recommended):
# Development with persistproc (enables AI monitoring)
persistproc pnpm start:dev
# Testing with persistproc
persistproc pnpm test:covTraditional Development:
# Development Mode
pnpm start:dev
# Building
pnpm build
# Production Mode
NODE_ENV="production" pnpm build && pnpm start:prodThe Lofty Views API follows RESTful principles with a focus on scenic view management:
{
id: number;
name: string;
description: string;
location: string;
imageUrl: string;
hearts: number;
createdAt: Date;
updatedAt: Date;
}All endpoints return standardized responses:
{
success: boolean;
message: string;
responseObject: T | null;
statusCode: number;
}This project demonstrates modern API development practices and is actively being developed with:
- ✅ User management system (complete)
- 🚧 Lofty views CRUD operations (in progress)
- 📋 Community features (planned)
This project includes persistproc integration for seamless AI agent collaboration:
- 🔍 Real-time Monitoring: AI agents can see live server logs and errors
- 🔄 Process Management: Agents can restart services when issues occur
- 🚀 Multi-Agent Support: Multiple AI tools can work with the same processes
- 📊 Centralized Logging: All development processes in one place
- Start persistproc server:
persistproc serve - Run development server:
persistproc pnpm start:dev - Ask your AI agent: "Show me the server logs" or "Restart the dev server"
# Process management through AI agents
"List running processes"
"Show me the latest server logs"
"Restart the development server"
"Check for any errors in the logs"src/
├── api/ # Feature-based API modules
│ ├── healthCheck/ # Health check endpoints
│ ├── user/ # User management (complete)
│ └── lofty-views/ # View management (planned)
├── api-docs/ # OpenAPI/Swagger documentation
├── common/ # Shared utilities and middleware
└── server.ts # Express server configuration
Built with Express.js, TypeScript, Zod validation, comprehensive testing, and AI agent integration via persistproc.