This project provides a web interface for managing and executing JasperReports, integrated with a Laravel backend and a Vue.js frontend. It allows you to upload JasperReports (.jrxml
) files, manage data sources, and execute reports in various formats.
- Report Management: Upload, view, and manage JasperReports (
.jrxml
) files. - Data Source Management: Configure and manage various database connections (MySQL, PostgreSQL, SQLite) and JSON/Array data sources.
- Report Execution: Execute reports with selected data sources and parameters, generating output in formats like PDF, XLS, XLSX, DOCX, and TXT.
- User Authentication: Secure access to the application.
Before you begin, ensure you have the following installed on your system:
- Docker: Used for containerizing the application.
- Docker Compose: Used for defining and running multi-container Docker applications.
Follow these steps to get the project up and running using Docker:
-
Clone the Repository:
git clone <repository_url> cd jasperContainer # Or the name of your cloned directory
-
Build and Run Docker Containers: Navigate to the project root directory (where
docker-compose.yml
is located) and run:docker-compose up --build -d
This command will:
- Build the
jasperphp-app
(PHP-FPM) image based onbackend12/Dockerfile
. - Start the
nginx
web server. - Start the
app
(PHP-FPM) service. - Create a shared network for the services.
- Build the
-
Install Backend Dependencies (Composer): Once the containers are running, execute Composer install within the
app
container:docker-compose exec app composer install --no-scripts --optimize-autoloader
-
Install Frontend Dependencies (NPM): Navigate to the
frontend/package
directory and install NPM dependencies:cd frontend/package npm install cd ../.. # Go back to the project root
-
Build Frontend Assets: Build the frontend assets for production:
cd frontend/package npm run build cd ../.. # Go back to the project root
-
Configure Environment Variables: Create a
.env
file for the backend by copying the example file:cp backend12/.env.example backend12/.env
Open
backend12/.env
and configure your database connection and other settings. -
Generate Application Key: Generate a unique application key for Laravel:
docker-compose exec app php artisan key:generate
-
Run Database Migrations and Seeders: Apply database migrations and seed the database with initial data (e.g., a default user):
docker-compose exec app php artisan migrate --seed
-
Default user end password: 'name' => 'Admin' 'email' => '[email protected]' 'password' => 'password'
The backend12/.env
file is crucial for configuring the application. Key variables include:
DB_CONNECTION
,DB_HOST
,DB_PORT
,DB_DATABASE
,DB_USERNAME
,DB_PASSWORD
: Your database connection details.- Or use embeded default sqlite database
After completing the installation and configuration steps, the application should be accessible via your web browser:
- Frontend: Open your browser and go to
http://localhost
. - Backend API: The backend API runs on port
80
(via Nginx) and9000
(PHP-FPM).
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is open-source and available under the MIT License.