This project is a Smart City Application, aiming to manage users, wallets, and transactions for various city services.
The application manages user data, including their associated wallets and transaction records. It offers functionalities to create users, link wallets to users, and handle transactions for city services.
- Java
- Spring Boot
- Hibernate
- MySQL
- Lombok
- Java 8 or higher
- MySQL
-
Clone the repository:
git clone https://github.com/your_username/smart-city-app.git
-
Navigate to the project directory:
cd smartcity
-
Configure the database in
application.properties
:spring.datasource.url=jdbc:mysql://localhost:3306/SmartCity spring.datasource.username=root spring.datasource.password=root_password
-
Run the application:
./mvnw spring-boot:run
To create a new user along with a wallet and transactions, use the /users/create
endpoint.
-
POST /users/create
: Creates a new user with associated wallet and transactions.Example Request Body:
{ "username": "username", "password": "password123", "transactions": [ { "amount": 100, "serviceType": "TRANSIT" // Add more transaction details here... }, // Add more transactions if needed... ] }
smart-city-app/
│
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── application/
│ │ │ └── smartcity/
│ │ │ ├── controller/
│ │ │ ├── model/
│ │ │ ├── repository/
│ │ │ └── service/
│ │ └── resources/
│ │ └── application.properties
│ └── test/
│ └── java/
│ └── com/
│ └── application/
│ └── smartcity/
│ └── (Test files)
├── mvnw
├── mvnw.cmd
├── README.md
└── (Other project files)