This guide covers the setup and deployment of KeepWiz for both development and production environments.
The application uses environment variables for configuration. There are two types:
- Build-time variables:
VITE_APP_VERSION,VITE_BUILD_DATEare baked into the Docker image - Runtime variables: Can be overridden with environment variables or a production
.envfile
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (for backend features)
- Docker and Docker Compose (optional)
- Copy the example environment file:
cp .env.example .env-
For development, the defaults in
.envwork out of the box. -
(Optional) Generate a secure JWT secret:
npm run setup-envcd frontend
npm install
npm run devThe frontend will be available at: http://localhost:3000
cd backend
npm install
npm startThe backend API will be available at: http://localhost:5000
The easiest way to get started is using Docker Compose:
# Clone the repository
git clone https://github.com/jkrumboe/wizard-tracker.git
cd wizard-tracker
# Start the full application stack
docker compose upThe application will be available at:
- Frontend: http://localhost:8088
- Backend API: http://localhost:5000
- MongoDB Admin: http://localhost:8081 (admin/admin123)
For production, override these critical variables:
# Set these in your production environment
JWT_SECRET=your-secure-production-jwt-secret
ME_CONFIG_BASICAUTH_USERNAME=your-admin-username
ME_CONFIG_BASICAUTH_PASSWORD=your-secure-password- Security: Always use strong, unique passwords and JWT secrets
- Environment Files: Never commit
.envfiles with production credentials - MongoDB: Use a managed MongoDB service or secure your MongoDB instance
- SSL/TLS: Use HTTPS in production with valid SSL certificates
- Monitoring: Set up logging and monitoring for your production environment
The Docker Compose file provides secure defaults that work for development and can be easily overridden for production without rebuilding images.
# Build with production environment variables
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d- Build the frontend:
cd frontend
npm install
npm run build- Set up the backend:
cd backend
npm install
NODE_ENV=production npm start- Configure a reverse proxy (nginx, Apache) to serve the frontend and proxy API requests to the backend.
- Port conflicts: Ensure ports 3000, 5000, 8081, and 8088 are available
- MongoDB connection: Verify MongoDB is running and accessible
- Environment variables: Double-check your
.envfile configuration - Docker issues: Try
docker compose downanddocker compose up --build
- Check the Development Guide
- Review the Architecture Overview
- Open an issue on GitHub if you encounter problems