A dual-technology accounting application consisting of a Grails 2.4.5 web application and a CUBA Platform 7.2.20 admin interface.
This system handles accounting operations with support for:
- Multiple environments (multi-tenant architecture)
- Multiple currencies
- Chart of accounts management
- Financial dimensions
- Posting management
- VAT code handling
- Vendor agreements
| Component | Technology | Description |
|---|---|---|
| Backend | Grails 2.4.5 | Core accounting logic and REST APIs |
| Admin | CUBA Platform 7.2.20 | Modern admin interface (submodule) |
| Frontend | ExtJS 6+ | Rich client-side application |
| Database | Microsoft SQL Server | Primary data store |
All domain entities use TENANT_ID for data isolation. The Environment domain represents tenant contexts.
/ext/$controller- RESTful CRUD endpoints (GET/PUT/POST/DELETE)/ext/$controller/action/$customAction- Custom action endpoints/workflow/$controller- Workflow-specific XML processing
- Java 8 (JDK 8)
- Grails 2.4.5 (install via SDKMAN)
- Gradle 5.6.4 (for CUBA admin)
- Microsoft SQL Server
- Docker (optional, for containerized deployment)
git clone git@bitbucket.org:bpa-solutions-a-s/accounting.git
cd accounting
git submodule update --init --recursivecurl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install grails 2.4.5
sdk install java 8.0.302-openCopy the example configuration files:
cp properties/Accounting-config.groovy.example properties/Accounting-config.groovy
cp properties/Accounting-dataSource.groovy.example properties/Accounting-dataSource.groovyEdit the files to set your database connection and other settings.
- System property:
accounting.config.fileandaccounting.datasource.file - Environment variables:
ACCOUNTING_CONFIG_FILEandACCOUNTING_DATASOURCE_FILE - Default Tomcat location:
$CATALINA_HOME/conf/accounting-*.groovy
| File | Purpose |
|---|---|
properties/Accounting-config.groovy |
Application settings, scheduled jobs |
properties/Accounting-dataSource.groovy |
Database connection settings |
# Run development server
grails run-app
# Build WAR file
grails war
# Build production WAR
grails prod war
# Run tests
grails test-app
# Clean and compile
grails clean
grails compilecd accountingadmin/
# Build the application
./gradlew assemble
# Deploy to local Tomcat
./gradlew deploy
# Create/update database
./gradlew createDb
./gradlew updateDb
# Build WAR files
./gradlew buildWar
# Build UberJar for standalone deployment
./gradlew buildUberJarTests use Spock framework. Test files are in test/unit/ and test/integration/.
# Run all tests
grails test-app
# Run unit tests only
grails test-app unit:
# Run integration tests only
grails test-app integration:
# Run specific test
grails test-app unit: *PostingService*cd accountingadmin/
./gradlew testBuild and run the Docker image:
# Build production WAR first
grails prod war
# Build CUBA WARs
cd accountingadmin && ./gradlew buildWar && cd ..
# Build Docker image
docker build -t accounting:latest .
# Run container
docker run -d -p 8080:8080 \
-e SQL_JDBCURL="jdbc:sqlserver://..." \
-e SQL_USERNAME="..." \
-e SQL_PASSWORD="..." \
accounting:latest-
Build the WAR files:
grails prod war cd accountingadmin && ./gradlew buildWar
-
Deploy to Tomcat:
- Copy
target/Accounting.warto$CATALINA_HOME/webapps/ - Copy CUBA WARs (
app.war,app-core.war) to$CATALINA_HOME/webapps/ - Copy configuration files to
$CATALINA_HOME/conf/
- Copy
accounting/
├── grails-app/
│ ├── conf/ # Application configuration
│ ├── controllers/ # MVC controllers
│ ├── domain/ # GORM domain models
│ ├── jobs/ # Quartz scheduled jobs
│ ├── migrations/ # Database migrations
│ ├── services/ # Business logic services
│ └── views/ # GSP views
├── web-app/
│ └── static/ # ExtJS frontend application
│ ├── app/
│ │ ├── model/ # Data models
│ │ ├── view/ # UI views
│ │ ├── store/ # Data stores
│ │ └── overrides/ # ExtJS overrides
│ └── build/ # Compiled frontend
├── accountingadmin/ # CUBA admin (git submodule)
│ ├── modules/
│ │ ├── global/ # Shared entities
│ │ ├── core/ # Business logic
│ │ └── web/ # Web interface
│ └── build.gradle
├── properties/ # Configuration files
├── docker-image/ # Docker configuration
└── install4j/ # Windows installer config
The system includes several Quartz-based scheduled jobs:
| Job | Purpose |
|---|---|
ImportJob |
General import processing |
ImportCOAJob |
Chart of Accounts import |
ImportUsersJob |
User synchronization |
ImportVATCODESJob |
VAT code import |
ExportPostingsJob |
Posting export processing |
CreateSettingsJob |
Settings synchronization |
Jobs are configured in properties/Accounting-config.groovy with cron triggers.
The accountingadmin/ directory is a Git submodule.
git submodule update --recursive --remotegit status
git commit -a -m "Update accountingadmin submodule"- Windows authentication via Waffle integration
- Keycloak SSO support
- Multi-tenant data isolation with
TENANT_ID
Database Connection Errors
- Verify SQL Server is running
- Check connection strings in
properties/Accounting-dataSource.groovy
Test Configuration
- Update hardcoded paths in
scripts/Events.groovyfor your local environment
ExtJS Build Issues
- Ensure proper build environment for production
- Check
web-app/static/build/for compiled assets
Java Version
- Main application requires Java 8
- Use SDKMAN to manage Java versions
The project uses Bitbucket Pipelines for continuous integration:
- Parallel builds for Grails and CUBA applications
- Docker image creation and push to Docker Hub
- Windows installer generation via Install4j
See bitbucket-pipelines.yml for configuration details.
Proprietary - BPA Solutions A/S