π Get Started Β |Β β¨ Features Β |Β ποΈ Architecture Β |Β π€ Contributing Β |Β πΊοΈ Roadmap
Smart City Guide is an interactive, console-based Java application that helps residents and tourists discover, search, and navigate city attractions with ease. It acts as an intelligent city companion with a complete role-based system for both regular users and administrators.
Whether you're looking for the best restaurant downtown or managing the city's attraction database as an admin β this app has you covered.
β οΈ Note: The application uses a MySQL Database for persistent storage. You will need to set up a local database before running the app. See the Database Setup section below.
| Feature | Description |
|---|---|
| π Register & Login | Secure account creation and authentication. |
| πΊοΈ View Attractions | Browse a curated list of city places. |
| π Search by Category | Find places by type β Restaurant, Park, Hotel, Museum. |
| π Search by Location | Find places in specific areas like Downtown or Main Street. |
| π Navigation | Simulated access to directions and nearby services. |
| Feature | Description |
|---|---|
| β Add Place | Add new city attractions to the database. |
| βοΈ Update Place | Edit details of existing places. |
| β Delete Place | Remove outdated or incorrect entries. |
| π System Monitoring | View system logs and user activity (Simulated). |
The application currently follows a monolithic architecture built around a centralized controller (SmartCityApp.java), making it an excellent starting point for beginners to understand Java control flows and JDBC. We are actively looking for contributors to help us refactor this into a Layered Architecture (MVC).
SmartCityGuide/
β
βββ π Assets/
β βββ SmartCity.drawio.png # Architecture diagram
β
βββ π src/
β βββ com/
β βββ smartcity/
β βββ π main/
β β βββ SmartCityApp.java # Main entry point, controller & UI logic
β βββ π model/
β β βββ Place.java # City place data model (POJO)
β β βββ User.java # User data model & roles (POJO)
β βββ π db/
β βββ DBConnection.java # JDBC MySQL Connection Manager
β
βββ db_setup.sql # SQL script to initialize the database
βββ README.md
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Community standards
βββ .gitignore
Make sure you have the following installed:
- β Java JDK 8 or higher β Download here
- π¬ MySQL Server β Download here
- π» Terminal / IDE β VS Code, IntelliJ IDEA, or Eclipse
- π¦ MySQL JDBC Driver β Ensure
mysql-connector-java.jaris in your project's classpath.
Before running the application, you must initialize the MySQL database.
- Open your MySQL client (e.g., MySQL Workbench or CLI).
- Run the provided SQL script:
(This creates the
mysql -u root -p < db_setup.sqlsmart_city_guidedatabase and theusersandplacestables).
# 1. Clone the repository
git clone https://github.com/Rajath2005/SmartCityApp.git
# 2. Navigate into the project
cd SmartCityApp/src
# 3. Compile the application (Make sure to include the MySQL JDBC Driver in your classpath)
javac com/smartcity/main/SmartCityApp.java
# 4. Run the application
java com.smartcity.main.SmartCityAppπ‘ Tip for beginners: If you're using an IDE like IntelliJ or Eclipse, import the project and run
SmartCityApp.javadirectly. Ensure the MySQL connector library is added to your project structure.
No local Java or MySQL install needed β everything runs in containers.
Prerequisites: Docker + Docker Compose.
# 1. Clone the repository
git clone https://github.com/Rajath2005/SmartCityApp.git
cd SmartCityApp
# 2. Build and start the app (attached to your terminal, since it's a CLI app)
docker compose run --rm appThis spins up a MySQL container (auto-seeded with db_setup.sql) and runs the app against it. docker compose run keeps stdin/stdout attached so menu prompts work interactively.
Useful commands:
# Start just the database in the background
docker compose up -d mysql-db
# Rebuild the app image after code changes
docker compose build app
# Reset the database (wipes all data, re-seeds on next run)
docker compose down -v
# Stop everything
docker compose downDefault DB credentials (override via DB_PASSWORD env var before running compose): user root, password root, database smart_city_guide.
| Layer | Technology |
|---|---|
| Language | Java β |
| Interface | Command Line Interface (CLI) |
| Data Storage | MySQL Database π¬ |
| Architecture | Monolithic (Role-Based) |
We β€οΈ contributions β whether you're fixing a bug, adding a feature, or improving docs! This project is highly focused on being a welcoming space for beginner Java developers.
Please read our Contributing Guidelines to learn how to get started.
We have specifically outlined Good First Issues (like refactoring to DAOs and fixing resource leaks) in the CONTRIBUTING.md file.
Please also review our Code of Conduct before participating.
A huge shoutout to everyone who has contributed to this project! π
|
Rajath Kiran A |
alexanderliberacion-cmd |
Shikha Singh |
Shruti Dixit |
Rajibul Mondal |
Pedro Sbaraini Cordeiro |
|
Jhansi Oruganti |
Julito-Dev |
Nishchay |
Want to see your face here? Check out our Contribution guide!
Here's what's coming next. Check our Issues tab to claim one!
- ποΈ Architecture Refactor β Migrate SQL logic from
SmartCityApptoDAO(Data Access Object) classes. - π Security β Hash user passwords (e.g., BCrypt).
- π REST API β Expose features via a Spring Boot REST API.
- π₯οΈ GUI Interface β Build a JavaFX or Swing-based graphical UI.
- β Ratings & Reviews β Let users rate and review places.
- π§ͺ Unit Tests β Add JUnit tests for all core classes.
This project is licensed under the MIT License β see the LICENSE file for details.