Getting Started
This guide will help you set up your development environment and start working with Syneo/Barcoding.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js >= 10 (recommended: 18 or 20 LTS)
- Yarn 1.22.22 or later
- MySQL server (for API database)
- Git for version control
Installation
1. Clone the Repository
bash
git clone <repository-url>
cd workspace2. Install API Dependencies
bash
cd api/b3api
npm install3. Install Web Dependencies
bash
cd web
yarn install4. Install Desktop Dependencies (Optional)
bash
cd desktop
npm installDatabase Setup
MySQL Configuration
The development environment uses MySQL with these credentials:
json
{
"host": "mysqldb",
"port": 3306,
"user": "root",
"password": "Ypp01o#3",
"database": "lb4"
}WARNING
These credentials are for development only. Never use them in production.
Run Migrations
bash
cd api/b3api
npm run migrateStarting the Development Servers
Start the API
bash
cd api/b3api
npm run build
npm run startThe API will be available at:
- API:
http://localhost:3001 - REST Explorer:
http://localhost:3001/explorer
Start Web Applications
Open three separate terminals:
Backend App (Port 4200):
bash
cd web
yarn start-backFront App (Port 4201):
bash
cd web
yarn start-frontDashboard App (Port 4202):
bash
cd web
yarn start-dashboardVerify Installation
- Check API: Visit
http://localhost:3001/explorerto see the REST API explorer - Check Backend: Visit
http://localhost:4200to see the Backend app - Check Front: Visit
http://localhost:4201to see the Front app - Check Dashboard: Visit
http://localhost:4202to see the Dashboard app
Development Workflow
Making Changes to the API
- Edit files in
api/b3api/src/ - Rebuild:
npm run buildor use watch mode:npm run build:watch - Restart the API:
npm run start
Making Changes to Web Apps
- Edit files in
web/projects/ - Changes will hot-reload automatically
- If you modify core packages, rebuild them:
ng build @barcoding/<package-name>
Regenerating the SDK
After API changes that affect endpoints:
bash
cd web
yarn build-sdkThis regenerates the @barcoding/sdk package from the API's OpenAPI spec.
Common Issues
Port Already in Use
If you see "port already in use" errors:
bash
# Find and kill the process using the port
lsof -ti:4200 | xargs kill -9 # For port 4200
lsof -ti:3001 | xargs kill -9 # For port 3001Build Errors
If you encounter build errors:
bash
# Clear Angular cache
rm -rf web/.cache
# Clear Jest cache
cd web && yarn jest --clearCache
# Reinstall dependencies
rm -rf node_modules && yarn installDatabase Connection Issues
Ensure MySQL is running and accessible:
bash
mysql -h mysqldb -P 3306 -u root -pYpp01o#3 lb4 -e "SELECT 1;"Next Steps
- Project Structure - Understand the codebase organization
- Development Commands - Learn all available commands
- Architecture Overview - Understand the system design