-
Notifications
You must be signed in to change notification settings - Fork 0
overview
The Currency Conversion API is a Java-based REST API designed for currency conversion. This project serves as an educational and reference Java project maintained on GitHub. It demonstrates key concepts of API development, including integration with external services, data persistence using an embedded database, and route management with Apache Camel. The entire project is containerized using Docker for ease of deployment and scalability. The project is designed to be easily extensible, maintainable, and deployable across various environments, including Windows, Linux, and Unix.
The primary purpose of this project is to provide a robust, scalable, and well-documented API for currency conversion. It is intended to serve as a base project for Java developers, showcasing best practices in software development, continuous integration, and continuous delivery (CI/CD).
The Currency Conversion API offers the following functionalities:
- Currency Pair Conversion: Accepts a currency pair as input (e.g., USD to BRL) and returns the conversion rate.
- External API Integration: Uses the Exchange Rate API to fetch the conversion rate between the provided currencies.
- Data Persistence: Stores the date, time, obtained conversion rate, and input currencies in an embedded database.
- Dockerized Deployment: The API is containerized using Docker, ensuring consistency across different environments.
- Programming Language: Java
- API Framework: Spring Boot (or any chosen REST framework)
- Database: Embedded database (e.g., H2)
- Containerization: Docker
- Integration Framework: Apache Camel for managing routes and integration with external services
- CI/CD: GitHub Actions for automated testing, building, and deployment
- Readability and Modularity: The code is structured to be easily readable and maintainable.
- Scalability: Designed to handle growing amounts of work.
- Robustness: Includes comprehensive unit tests to ensure the API functions correctly.
- Best Practices: Adheres to good software development practices and standards.
- Automated Documentation and Changelog Generation: CI/CD pipeline generates necessary documentation and manages changelog updates.
-
Set Permissions:
chmod +x index.sh chmod +x scripts/*.sh -
Start Server:
bash server.sh
-
Access Client:
bash console.sh
-
List Data:
bash db.sh
-
Start Server:
server.bat
-
Access Client:
console.bat
-
List Data:
db.bat
The project includes a GitHub Actions workflow for CI/CD, which:
- Sets up the Java environment with JDK 17.
- Installs necessary dependencies and tools (e.g., Groovy, Maven).
- Generates documentation and artifacts (e.g., SVG images for Markdown, Swagger documentation).
- Runs tests and ensures code quality.
- Deploys the application using Docker.
The Currency Conversion API project is a comprehensive example of modern Java application development, demonstrating integration with external services, use of Docker for containerization, and implementation of a robust CI/CD pipeline. It is designed to be a useful resource for Java developers looking to understand and implement similar functionalities in their projects.
- Overview.
- Project Objectives: Enumeration of the main objectives that the project aims to achieve.
- Scope and Functionalities: Description of the main functionalities offered by the project and its scope of operation.
- Initial Configurations: Steps required to set up the development or production environment.
- Installation Instructions: Detailed procedures for installing the project in different environments.
- Docker Configuration: Specifications on how to configure and use Docker for the project.
- Folder Structure: Description of the organization of the project directories.
- Project Architecture: Explanation of the architecture used, including design patterns and technical decisions.
- Development Flow: Description of the development process adopted, including planning, coding, and review stages.
- Apache Camel Integration: Guide on integrating Apache Camel into the project, including configuration and usage.
- Contributors and Authors: Recognition of the contributors to the project.
- Contributions: Guidelines on how to contribute to the project, including code standards and pull request requirements, tips and best practices.
- Code of Conduct: Behavioral guidelines expected for the project community.
- OpenAPI Specification: Details about the OpenAPI specification used to document the API endpoints.
- API Documentation with Swagger: Information on how to access and use the interactive API documentation generated by Swagger.
- Javadoc Documentation: Information on the Javadoc documentation generated for the project.
- Endpoint Description: Details of the available API endpoints, including methods, parameters, and usage examples.
- Database Management: Strategies and practices for efficient management of the database used by the project.
- Testing Strategies: Approach and methods used to test the software, including unit, integration, and E2E tests.
- Testing Tools: Description of the testing tools used in the project and how to configure them.
- CI/CD Pipeline: Explanation of the continuous integration and delivery pipeline, detailing each stage and its function.
- Automations and Artifact Generation: Description of the automations incorporated into the CI/CD, including documentation generation and build artifacts.
- .gitignore, .editorconfig and project.properties: Utility of these files to maintain code consistency and quality.
- Maven Wrapper and application.properties: Explanation of how these files help standardize the development environment.
- .env File and Travis CI Settings: Use of these files to configure the environment and CI integrations.
- Code Standards and Security: Guidelines for maintaining code quality and security.
- Monitoring and Logging Practices: Recommended techniques for monitoring and logging in the project.
- Licensing: Information about the rights and restrictions associated with the use of the software.
- Terms of Use: Information about the terms and conditions for using the software.
- Future Plans: Discussion on functionalities and improvements considered for future versions of the project.
- Improvement Proposals: Space for the community to suggest and debate improvements and innovations.
- External Links and References: Additional resources and external documentation relevant to the project.
- Security Policy: Details on the supported versions, reporting vulnerabilities, and general security practices.