{"id":20181333,"url":"https://github.com/lasbrdev/register-company-jsf-primefaces","last_synced_at":"2026-04-12T03:31:38.889Z","repository":{"id":226704590,"uuid":"769442311","full_name":"lasbrDev/register-company-jsf-primefaces","owner":"lasbrDev","description":"Application for business registration.","archived":false,"fork":false,"pushed_at":"2024-05-26T12:47:42.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T17:19:57.991Z","etag":null,"topics":["docker","java","jsf","linux","mysql","primefaces","tomcat"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lasbrDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-09T04:53:02.000Z","updated_at":"2024-03-14T11:33:29.000Z","dependencies_parsed_at":"2024-11-14T07:03:28.040Z","dependency_job_id":null,"html_url":"https://github.com/lasbrDev/register-company-jsf-primefaces","commit_stats":null,"previous_names":["lasbrdev/register-company-jsf-primefaces"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasbrDev%2Fregister-company-jsf-primefaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasbrDev%2Fregister-company-jsf-primefaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasbrDev%2Fregister-company-jsf-primefaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasbrDev%2Fregister-company-jsf-primefaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lasbrDev","download_url":"https://codeload.github.com/lasbrDev/register-company-jsf-primefaces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241616700,"owners_count":19991543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","java","jsf","linux","mysql","primefaces","tomcat"],"created_at":"2024-11-14T02:35:07.138Z","updated_at":"2025-12-01T08:04:08.055Z","avatar_url":"https://github.com/lasbrDev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project: Company Registration JSF\n\n## Project Overview\n\nThe Company Registration JSF project is a Java web application designed for managing company registration data. It utilizes JavaServer Faces (JSF) as the web framework and follows a structured architecture, encompassing model, repository, service, and utility layers. The project also includes example classes for testing server responses and demonstrating report functionalities.\n\nNote: This project is still under development.\n\n## Project Structure\n\n### br.com.lasbr.erp.model\n\nContains model classes, such as `Company`, `CompanyType`, and `FieldActivity`.\n\n### br.com.lasbr.erp.repository\n\nResponsible for data access. Contains classes like `Companies` and `FieldActivities` that provide methods for retrieving, saving, and removing data from the database.\n\n### br.com.lasbr.erp.service\n\nProvides services related to business logic. `RegistrationCompanyService` is a service for saving and removing companies.\n\n### br.com.lasbr.erp.util\n\nContains utility classes. `EntityManagerProducer` is responsible for creating and closing `EntityManager` instances for interacting with the database. `TransactionalInterceptor` is an interceptor that manages transactions.\n\n### br.com.lasbr.id\n\nAdditional package with example classes (`Main`, `Orders`, `ReportService`, `ReportServlet`) to test the server response at localhost:8080/company-registration-jsf/relatorio.\n\n## Main Methods\n\n### `Company` (br.com.lasbr.erp.model.Company)\n\n- **`save` and `remove` (in `Companies`):** Methods for saving and removing companies in the database.\n\n### `FieldActivity` (br.com.lasbr.erp.model.FieldActivity)\n\n- **`search` (in `FieldActivities`):** Performs a search for field activities in the database based on a provided description.\n\n### `PersistenceLayer` (br.com.lasbr.erp.repository.PersistenceLayer)\n\n- **`main`:** Example of using the `Companies` and `FieldActivities` classes to interact with the database. Performs operations like searching, creating, and removing companies.\n\n### `EntityManagerProducer` (br.com.lasbr.erp.util.EntityManagerProducer)\n\n- **`createEntityManager` and `closeEntityManager`:** Methods for creating and closing `EntityManager` instances.\n\n### `TransactionalInterceptor` (br.com.lasbr.erp.util.TransactionalInterceptor)\n\n- **`invoke`:** Interceptor that manages transactions around methods annotated with `@Transactional`.\n\n### `ReportService` (br.com.lasbr.id.ReportService) and `ReportServlet` (br.com.lasbr.id.ReportServlet)\n\n- **`totalOrdersCurrentMonth` and `doGet`:** Examples of classes demonstrating how to retrieve and display report information.\n\n\n## Configuration of the Environment\n\nMake sure to have installed on your machine:\n\n- Java 17\n- Apache Tomcat 8.5.99 (installed locally)\n- Maven\n- Eclipse IDE\n\n### Database\n\n#### Option 1: Local MySQL\n\n1. Install MySQL locally.\n2. Execute the `initial-data.sql` script located in `src/main/resources/sql` to create the necessary tables in MySQL.\n\n#### Option 2: MySQL via Docker\n\n1. Ensure Docker is installed.\n2. Execute the following command to start a MySQL container (replace `YOUR_USER` and `YOUR_PASSWORD` with the desired values):\n\n    ```bash\n    docker run -d --name mysql_dev -p 33306:3306 -e MYSQL_ROOT_PASSWORD=YOUR_PASSWORD -e MYSQL_DATABASE=company_registration -v mysql-database:/var/lib/mysql --network REDEMSQL mysql:latest\n    ```\n\n    - `YOUR_USER`: User created to access MySQL.\n    - `YOUR_PASSWORD`: Password associated with the created user.\n\n3. Wait a few seconds for MySQL to start.\n4. Execute the `initial-data.sql` script located in `src/main/resources/sql` to create the necessary tables in MySQL.\n\n## Development Environment Setup\n\n1. Import the project into Eclipse IDE.\n2. Make sure to configure the `persistence.xml` file with the correct information for your database.\n\n## Running the Project\n\n1. Start the Tomcat 8.5.99 server locally.\n2. Execute the project in your IDE or compile and deploy the generated WAR file on Tomcat.\n\n### Running with Docker\n\nIf you prefer, you can use the locally installed MySQL or the Docker instance.\n\n## Testing the Application\n\nYou can use the [http://localhost:8080/company-registration-jsf/relatorio](http://localhost:8080/company-registration-jsf/relatorio) endpoint to test the server response.\n\n## Contribution\n\nFeel free to contribute with improvements, bug fixes, or new features.\n\n## Authors\n\n- [@lasbrDev](https://github.com/lasbrDev)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasbrdev%2Fregister-company-jsf-primefaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flasbrdev%2Fregister-company-jsf-primefaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasbrdev%2Fregister-company-jsf-primefaces/lists"}