![]() |
1 день тому | |
---|---|---|
.github | 1 день тому | |
backend | 1 день тому | |
database | 1 день тому | |
frontend | 1 день тому | |
.env.example | 1 день тому | |
.gitignore | 1 день тому | |
README.md | 1 день тому | |
docker-compose.yml | 1 день тому | |
package-lock.json | 1 день тому | |
package.json | 1 день тому |
A comprehensive multi-component web application designed to test the Build Your Own Platform (BYOP) engine. This project demonstrates various deployment scenarios including single-component and multi-component architectures.
This application consists of three main components:
# Install all dependencies
npm run install-all
# Start with Docker Compose (recommended)
npm run dev
# Or start services individually
npm run dev-local
Import Components: Import each component separately into BYOP
https://github.com/yourusername/byop-sample-app
(frontend folder)https://github.com/yourusername/byop-sample-app
(backend folder)Create Single-Component Apps: Test individual component deployment
Create Multi-Component Apps: Test full-stack application deployment
byop-sample-app/
├── frontend/ # React application
│ ├── src/
│ │ ├── App.js # Main application component
│ │ ├── index.js # React entry point
│ │ └── index.css # Global styles
│ ├── public/
│ │ └── index.html # HTML template
│ ├── Dockerfile # Frontend container
│ ├── nginx.conf # Nginx configuration
│ └── package.json # Frontend dependencies
├── backend/ # Node.js API
│ ├── server.js # Express server
│ ├── Dockerfile # Backend container
│ └── package.json # Backend dependencies
├── database/ # Database configuration
│ └── init.sql # Database initialization
├── docker-compose.yml # Multi-service orchestration
├── package.json # Root project configuration
└── README.md # This file
http://localhost:5000
GET /
- API information and healthGET /health
- Health check endpointGET /api/users
- Get all usersGET /api/users/:id
- Get user by IDPOST /api/users
- Create new userPUT /api/users/:id
- Update userDELETE /api/users/:id
- Delete userGET /api/stats
- Get application statisticsREACT_APP_API_URL=http://backend:5000 # API endpoint
NODE_ENV=production # Environment mode
DATABASE_URL=postgresql://... # Database connection
JWT_SECRET=your-secret-key # JWT secret
PORT=5000 # Server port
POSTGRES_USER=postgres # Database user
POSTGRES_PASSWORD=password # Database password
POSTGRES_DB=byop_sample # Database name
# Frontend
docker build -t byop-sample-frontend ./frontend
# Backend
docker build -t byop-sample-backend ./backend
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
http://localhost:3000
(visual health check)http://localhost:5000/health
(JSON response)# Check container status
docker-compose ps
# View container logs
docker-compose logs [service-name]
# Exec into container
docker-compose exec [service-name] sh
# Reset everything
docker-compose down -v
docker system prune -f
This project is specifically designed to test various BYOP engine scenarios:
MIT License - Feel free to use this project for testing and learning purposes.
This is a testing project for the BYOP engine. Feel free to:
Happy Testing! 🎉