This is a comprehensive REST API platform built with a modern full-stack architecture. It provides a complete API documentation and testing interface with support for users, posts, and comments management. The application follows industry best practices with a clean separation between frontend and backend concerns.
- Framework: React 18 with TypeScript
- Styling: Tailwind CSS with shadcn/ui component library
- Routing: Wouter for client-side routing
- State Management: TanStack Query (React Query) for server state management
- Build Tool: Vite for fast development and optimized builds
- UI Components: Comprehensive component library based on Radix UI primitives
- Runtime: Node.js with Express.js framework
- Language: TypeScript with ES modules
- Database: PostgreSQL with Drizzle ORM
- Database Provider: Neon serverless PostgreSQL
- Validation: Zod schemas for input validation
- Development: Hot reload with Vite middleware integration
client/- React frontend applicationserver/- Express.js backend APIshared/- Shared types, schemas, and utilitiesmigrations/- Database migration files
- ORM: Drizzle ORM with PostgreSQL dialect
- Schema Location:
shared/schema.ts - Tables:
- Users (authentication and profiles)
- Posts (blog-style content)
- Comments (nested discussions)
- Validation: Drizzle-Zod integration for type-safe schemas
- REST Endpoints: Full CRUD operations for all resources
- Error Handling: Standardized error responses with detailed messages
- Storage Interface: Abstracted storage layer supporting both in-memory and database implementations
- Request Validation: Middleware-based validation using Zod schemas
- API Documentation: Interactive OpenAPI-style documentation
- API Testing: Built-in testing interface for all endpoints
- Postman Export: Generate Postman collections from API specs
- Real-time Validation: Form validation with react-hook-form
- Responsive Design: Mobile-first responsive interface
- Client Requests: Frontend makes HTTP requests using TanStack Query
- Express Middleware: Requests pass through validation and logging middleware
- Route Handlers: Business logic processes requests in route handlers
- Storage Layer: Data operations through abstracted storage interface
- Database Operations: Drizzle ORM handles database interactions
- Response Formatting: Standardized JSON responses with error handling
- @neondatabase/serverless: Serverless PostgreSQL connection
- drizzle-orm: Type-safe database ORM
- @tanstack/react-query: Server state management
- @radix-ui/*: Accessible UI primitives
- zod: Runtime type validation
- react-hook-form: Form state management
- tsx: TypeScript execution for development
- esbuild: Fast JavaScript bundler for production
- vite: Development server and build tool
- tailwindcss: Utility-first CSS framework
- Command:
npm run dev - Port: 5000
- Hot Reload: Vite middleware integration
- Database: Environment-based PostgreSQL connection
- Frontend Build: Vite builds static assets to
dist/public - Backend Build: esbuild bundles server code to
dist/index.js - Deployment Target: Autoscale deployment on Replit
- Environment Variables:
DATABASE_URLrequired for PostgreSQL connection
- Migrations: Drizzle Kit for schema migrations
- Push Command:
npm run db:pushfor development schema updates - Configuration:
drizzle.config.tsdefines database connection and migration settings
Changelog:
- June 28, 2025. Project cleanup and documentation
- Created comprehensive README.md with installation and usage instructions
- Removed unused api-documentation.tsx page file
- Cleaned up project structure for better maintainability
- June 28, 2025. Enhanced RESTful resource naming conventions
- Added query parameter filtering for posts (authorId, published)
- Added query parameter filtering for comments (postId, authorId)
- Improved OpenAPI specification with detailed descriptions
- Updated frontend documentation to reflect RESTful best practices
- Maintained backward compatibility with existing nested routes
- June 26, 2025. Initial setup
Preferred communication style: Simple, everyday language.