4.2 KiB
4.2 KiB
Atlas CMMS Backend
This directory contains the backend configuration and assets for the Atlas CMMS system.
Overview
The backend uses the official Atlas CMMS Docker image (intelloop/atlas-cmms-backend) which provides:
- Spring Boot API: Java 8 based REST API
- PostgreSQL Integration: Database for all CMMS data
- MinIO Integration: Object storage for files and documents
- JWT Authentication: Secure token-based authentication
- Role-based Access Control: Multi-level user permissions
- Email Notifications: SMTP support for system notifications
- OAuth2 Support: Google and Microsoft SSO integration
Directory Structure
backend/
├── logos/ # Custom logo files for branding
├── config/ # Configuration files
├── scripts/ # Utility scripts
└── README.md # This file
Configuration
The backend is configured through environment variables defined in the main .env file:
Database Configuration
DB_USER: PostgreSQL usernameDB_PASSWORD: PostgreSQL password- Database name is set to
atlasby default
API Configuration
PUBLIC_API_URL: External API URL (e.g., http://localhost:8080)JWT_SECRET_KEY: Secret key for JWT token signing (minimum 32 characters)PUBLIC_FRONT_URL: Frontend URL for CORS and redirects
Storage Configuration
MINIO_ROOT_USER: MinIO admin usernameMINIO_ROOT_PASSWORD: MinIO admin passwordMINIO_BUCKET_NAME: Bucket name for file storage
Email Configuration (Optional)
SMTP_HOST: SMTP server hostnameSMTP_PORT: SMTP server port (default: 587)SMTP_USER: SMTP usernameSMTP_PASSWORD: SMTP passwordMAIL_FROM: From email address
Optional Features
ENABLE_SSO: Enable Single Sign-On (true/false)ENABLE_INVITATIONS: Enable user invitations (true/false)
OAuth2 Configuration (Optional)
GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET: Google OAuth2 credentialsMICROSOFT_CLIENT_ID/MICROSOFT_CLIENT_SECRET: Microsoft OAuth2 credentials
Custom Branding
Place custom logo files in the logos/ directory. The backend will mount this directory and make logos available for the application.
Supported formats:
- PNG
- JPG/JPEG
- SVG
API Endpoints
The Atlas CMMS backend provides comprehensive REST API endpoints:
Authentication
POST /api/auth/signin- User loginPOST /api/auth/signup- User registrationPOST /api/auth/logout- User logoutPOST /api/auth/refresh- Token refresh
Work Orders
GET /api/work-orders- List work ordersPOST /api/work-orders- Create work orderGET /api/work-orders/{id}- Get work order detailsPUT /api/work-orders/{id}- Update work orderDELETE /api/work-orders/{id}- Delete work order
Assets
GET /api/assets- List assetsPOST /api/assets- Create assetGET /api/assets/{id}- Get asset detailsPUT /api/assets/{id}- Update assetDELETE /api/assets/{id}- Delete asset
Users
GET /api/users- List usersPOST /api/users- Create userGET /api/users/me- Get current userPUT /api/users/{id}- Update user
Health Checks
The backend includes health check endpoints:
GET /api/health- Application health statusGET /api/info- Application information
Development
Running Locally
To run the backend locally outside of Docker:
- Install Java 8 JDK
- Set up PostgreSQL database
- Configure environment variables
- Build and run the Spring Boot application
Custom Development
If you need to customize the backend:
- Fork the Atlas CMMS repository
- Make your changes
- Build your own Docker image
- Update the
docker-compose.ymlto use your custom image
Support
For backend-specific issues:
- Check the Atlas CMMS documentation: https://grashjs.github.io/user-guide/
- File issues at: https://github.com/Grashjs/cmms/issues
- Contact: contact@atlas-cmms.com
Security Considerations
- Change default passwords in production
- Use strong JWT secret keys (minimum 32 characters)
- Enable HTTPS in production environments
- Regularly update the Docker images
- Secure your PostgreSQL and MinIO instances
- Use proper firewall rules and network security