A comprehensive full-stack web application built with React.js frontend and Node.js/Express.js backend, designed for AI model testing and demonstration purposes.
- Multi-Tab Interface: Dashboard, Users, Products, Tasks, Orders, and Search
- Real-time Analytics: Visual dashboard with key metrics
- CRUD Operations: Full Create, Read, Update, Delete functionality
- Advanced Search: Cross-entity search with filtering
- Responsive Design: Mobile-friendly interface
- Interactive UI: Dynamic forms, modals, and real-time updates
- RESTful API: Complete REST endpoints with proper HTTP methods
- Data Management: Users, Products, Tasks, Orders with relationships
- Advanced Filtering: Query parameters for sorting, pagination, filtering
- Bulk Operations: Create multiple records simultaneously
- Error Handling: Comprehensive error responses with proper status codes
- Test Endpoints: Special endpoints for AI model testing scenarios
- Slow Response Simulation: Test timeout handling
- Error Code Generation: Test error handling (400, 401, 403, 404, 500)
- Large Data Sets: Generate large JSON responses for performance testing
- Echo Endpoint: Return request data for debugging
- Random Data Generation: Various data types for testing
- Pagination: Test pagination scenarios
βββ client/ # React frontend
β βββ public/
β βββ src/
β β βββ App.js # Main React component with tabs
β β βββ App.css # Enhanced styling
β β βββ index.js # Entry point
β βββ package.json # Client dependencies
βββ server/ # Express backend
β βββ index.js # Enhanced server with multiple endpoints
βββ .github/
β βββ copilot-instructions.md # AI assistant instructions
βββ .vscode/
β βββ tasks.json # VS Code tasks
βββ package.json # Root package.json with scripts
βββ .gitignore # Git ignore file
βββ README.md # This file
-
Install root dependencies:
npm install
-
Install client dependencies:
cd client && npm install && cd ..
-
Install server dependencies:
cd server && npm install && cd ..
npm run devThis starts both frontend (http://localhost:3000) and backend (http://localhost:5000)
- Backend only:
npm run server - Frontend only:
npm run client - Production:
npm start
| Method | Endpoint | Description | Query Parameters |
|---|---|---|---|
| GET | /api |
API information and endpoints | - |
| GET | /api/health |
System health and metrics | - |
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /api/users |
Get all users | role, limit |
| GET | /api/users/:id |
Get user by ID | - |
| POST | /api/users |
Create new user | name, email, role |
| PUT | /api/users/:id |
Update user | name, email, role |
| DELETE | /api/users/:id |
Delete user | - |
| GET | /api/users/paginated |
Paginated users | page, limit |
| POST | /api/users/bulk |
Create multiple users | users[] |
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /api/products |
Get all products | category, minPrice, maxPrice, sort, limit |
| GET | /api/products/:id |
Get product by ID | - |
| POST | /api/products |
Create new product | name, price, category, stock, description |
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /api/tasks |
Get all tasks | completed, priority, assignedTo |
| POST | /api/tasks |
Create new task | title, priority, assignedTo |
| PUT | /api/tasks/:id |
Update task | title, completed, priority, assignedTo |
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /api/orders |
Get all orders | userId, status |
| POST | /api/orders |
Create new order | userId, productId, quantity |
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /api/analytics |
Get system analytics | - |
| GET | /api/search |
Search across entities | q (query), type |
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /api/test/slow |
Simulate slow response | delay (milliseconds) |
| GET | /api/test/error/:code |
Generate specific error | HTTP status code |
| GET | /api/test/large-data |
Generate large dataset | count |
| POST | /api/test/echo |
Echo request data | Any JSON body |
| GET | /api/test/random |
Generate random data | type (string, number, boolean, array, object) |
curl -X POST http://localhost:5000/api/users \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"john@example.com","role":"admin"}'curl "http://localhost:5000/api/products?category=Electronics&minPrice=100&sort=price_asc"curl http://localhost:5000/api/test/error/404curl "http://localhost:5000/api/test/large-data?count=5000"This application is designed to test various AI model capabilities:
- API Integration Testing: Test API calling and response parsing
- Error Handling: Verify proper error response processing
- Data Processing: Handle large datasets and complex JSON structures
- User Interface Interaction: Test form submissions and UI navigation
- Search and Filtering: Test query construction and result processing
- CRUD Operations: Test all database operations
- Performance Testing: Use slow endpoints and large datasets
- Authentication Flow: Test with different user roles
- React.js 19+ with Hooks
- Modern CSS with Grid/Flexbox
- Fetch API for HTTP requests
- Responsive design principles
- Node.js with Express.js 5+
- CORS middleware
- JSON request/response handling
- In-memory data storage (easily replaceable with database)
- nodemon for auto-reload
- concurrently for running multiple processes
- VS Code tasks and debugging support
- Real-time analytics and metrics
- System health monitoring
- Overview of all entities
- Add, view, and delete users
- Role-based user management
- User filtering and search
- Product catalog management
- Category and price filtering
- Stock level monitoring
- Task creation and management
- Priority-based organization
- User assignment
- Task completion tracking
- Order creation and tracking
- User and product selection
- Order status management
- Global search across all entities
- Real-time search results
- Category-specific filtering
- Orders link users and products
- Tasks can be assigned to users
- Analytics aggregate data across entities
- Frontend form validation
- Backend data validation
- Comprehensive error messages
- Conflict detection (duplicate emails)
- Efficient data filtering
- Pagination support
- Optimized search algorithms
- Memory usage monitoring
- Start development servers:
npm run dev - Frontend auto-reloads on file changes
- Backend restarts automatically with nodemon
- Use browser dev tools for frontend debugging
- Monitor console for API request logs
- Test all CRUD operations through the UI
- Verify error handling with invalid data
- Test search functionality across entities
- Verify responsive design on different screen sizes
- Use curl or Postman for endpoint testing
- Test error scenarios with
/api/test/error/:code - Performance test with
/api/test/large-data - Validate request/response with
/api/test/echo
- Test API integration capabilities
- Verify JSON parsing with complex responses
- Test error recovery and handling
- Validate search and filter functionality
Common Issues:
- Port conflicts: Ensure ports 3000 and 5000 are available
- CORS errors: Check proxy configuration in client/package.json
- Module errors: Run
npm installin both root and client directories - API connection: Verify backend is running on http://localhost:5000
Development Tips:
- Use browser Network tab to debug API calls
- Check console logs for detailed error messages
- Use VS Code debugger for backend debugging
- Monitor memory usage with
/api/healthendpoint
ISC License - Feel free to use this project for testing, learning, and development purposes.