Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LocalizaCNPJ is a Java GUI application that queries Brazilian CNPJ data via BrasilAPI, retrieving details such as company name, opening date, address, and postal code. Developed with JDK 24, Maven, and FlatLaf for a clean interface, it includes error handling and real-time data access. ๐Ÿ‡ง๐Ÿ‡ท๐Ÿ”

Notifications You must be signed in to change notification settings

willmayrink/LocalizaCNPJ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LocalizaCNPJ ๐Ÿ‡ง๐Ÿ‡ท๐Ÿ”

Welcome to LocalizaCNPJ, a slick Java GUI app that lets you query Brazilian CNPJ data with ease! Powered by the BrasilAPI, this app fetches key details like company name, opening date, address, and postal code in a snap. Perfect for developers, entrepreneurs, or anyone curious about Brazilian businesses! ๐Ÿ˜Ž

๐ŸŽฏ Features

  • CNPJ Lookup: Enter a valid CNPJ and get instant info! ๐Ÿ“Š
  • Data Display: Shows company details like:
    • ๐Ÿ“… Opening date
    • ๐Ÿข Legal name (razรฃo social)
    • ๐Ÿ“ Full address
    • ๐Ÿ“ฎ Postal code (CEP)
  • Sleek UI: Built with FlatLaf for a modern, polished look. โœจ
  • Real-Time Queries: Fetches live data from BrasilAPI. ๐ŸŒ
  • Error Handling: Graceful handling of invalid inputs or API errors. ๐Ÿ›ก๏ธ

๐Ÿ› ๏ธ Tech Stack

  • Java: JDK 24 โ˜•
  • Build Tool: Maven 3.9.11 ๐Ÿ› ๏ธ
  • HTTP Client: Apache HttpClient 5.5 ๐Ÿ“ก
  • JSON Parsing: Jackson Databind 2.15.2 ๐Ÿงฉ
  • Logging: SLF4J Simple 2.0.9 ๐Ÿ“œ
  • UI Theme: FlatLaf 3.6.1 ๐ŸŽจ
  • API: BrasilAPI ๐Ÿš€

๐Ÿš€ Getting Started

Prerequisites

  • JDK 24: Make sure you have Java 24 installed. Download here. โ˜•
  • Maven 3.9.11: Get Maven to build the project. Install guide. ๐Ÿ› ๏ธ
  • Internet: Required to connect to BrasilAPI. ๐ŸŒ

Installation

  1. Clone the repo:
    git clone https://github.com/willmayrink/LocalizaCNPJ.git
  2. Navigate to the project folder:
    cd LocalizaCNPJ
  3. Build the project with Maven:
    mvn clean install
  4. Run the app:
    mvn exec:java
    Or, use the generated executable JAR:
    java -jar target/LocalizaCNPJ-1.0.jar

Usage

  1. Fire up the app. ๐Ÿ”ฅ
  2. Enter a valid CNPJ (e.g., 12345678000195) in the input field. โœ๏ธ
  3. Hit the query button to fetch data from BrasilAPI. ๐Ÿš€
  4. Check out the results: company name, opening date, address, and CEP displayed in the GUI. ๐ŸŽ‰

๐Ÿ“š Dependencies

All dependencies are managed in the pom.xml. Key libraries include:

  • Apache HttpClient 5.5: For making HTTP requests to BrasilAPI.
  • Jackson Databind 2.15.2: For parsing JSON responses.
  • SLF4J Simple 2.0.9: For lightweight logging.
  • FlatLaf 3.6.1: For a modern, flat UI theme.

See the full pom.xml in the repo for details. ๐Ÿ“„

๐Ÿ› ๏ธ Build Details

The project uses the Maven Shade Plugin to create an executable JAR with all dependencies included. The main class is com.rjoliveira.localizacnpj.view.Main. Run mvn package to generate the JAR in the target/ directory. ๐Ÿ—๏ธ

๐ŸŒ API Reference

This app queries the BrasilAPI endpoint /api/cnpj/v1/{cnpj} to fetch CNPJ data. Check out the BrasilAPI docs for more details. ๐Ÿ“ก

๐Ÿค Contributing

Want to make this app even cooler? Contributions are welcome! ๐ŸŽ‰

  1. Fork the repo: https://github.com/willmayrink/LocalizaCNPJ
  2. Create a feature branch:
    git checkout -b feature/awesome-feature
  3. Commit your changes:
    git commit -m "Add awesome feature"
  4. Push to your branch:
    git push origin feature/awesome-feature
  5. Open a pull request and letโ€™s make it happen! ๐Ÿš€

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file in the repo for details. ๐Ÿ—ณ๏ธ

๐Ÿ™Œ Acknowledgments

  • BrasilAPI for providing free, open CNPJ data. ๐Ÿ™
  • FlatLaf for the sleek UI theme. ๐ŸŽจ
  • All contributors who make this project shine! ๐ŸŒŸ

๐Ÿ“ฌ Contact

Got questions or ideas? Open an issue on GitHub or ping me there! ๐Ÿ“ฉ

Happy coding! ๐Ÿ’ป

About

LocalizaCNPJ is a Java GUI application that queries Brazilian CNPJ data via BrasilAPI, retrieving details such as company name, opening date, address, and postal code. Developed with JDK 24, Maven, and FlatLaf for a clean interface, it includes error handling and real-time data access. ๐Ÿ‡ง๐Ÿ‡ท๐Ÿ”

Topics

Resources

Stars

Watchers

Forks

Languages