Busrakbn/Apartment-Management-System
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# MyApartment
MyApartment is a full-stack web application for managing apartment-related tasks such as flat management, user (resident) management, payments, and expenses. The project consists of a Spring Boot backend and an Angular frontend.
---
## Project Structure
```
apartment/ # Spring Boot backend (Java)
my-apartment/ # Angular frontend (TypeScript)
```
---
## Backend (Spring Boot)
- **Location:** [`apartment/`](../apartment)
- **Main entry point:** [`com.acelya.apartment.ApartmentApplication`](../apartment/src/main/java/com/acelya/apartment/ApartmentApplication.java)
- **Database:** PostgreSQL (see [`application.properties`](../apartment/src/main/resources/application.properties))
- **Docker:** Includes a [`docker-compose.yml`](../apartment/docker-compose.yml) for running PostgreSQL and Adminer.
### Running the Backend
1. **Configure Database:**
- The backend expects a PostgreSQL database running at `localhost:5432` with:
- Database: `apartment_db`
- User: `postgres`
- Password: `Ad2004ile`
- You can start the database using Docker Compose:
```sh
docker-compose up
```
from the [`apartment/`](../apartment) directory.
2. **Build and Run:**
```sh
./mvnw spring-boot:run
```
or use your IDE to run [`ApartmentApplication`](../apartment/src/main/java/com/acelya/apartment/ApartmentApplication.java).
---
## Frontend (Angular)
- **Location:** [`my-apartment/`](../my-apartment)
- **Main entry point:** [`src/index.html`](../my-apartment/src/index.html)
- **Angular CLI Version:** 19.1.8
### Development Server
To start the frontend development server:
```sh
ng serve
```
Navigate to [http://localhost:4200/](http://localhost:4200/). The app will reload automatically if you change any source files.
### Code Scaffolding
Generate a new component:
```sh
ng generate component component-name
```
For more schematics:
```sh
ng generate --help
```
### Building
To build the project:
```sh
ng build
```
Build artifacts will be stored in the `dist/` directory.
### Running Unit Tests
To execute unit tests with [Karma](https://karma-runner.github.io):
```sh
ng test
```
### Running End-to-End Tests
For end-to-end (e2e) testing:
```sh
ng e2e
```
Angular CLI does not include an e2e framework by default; you can choose one that suits your needs.
---
## Additional Resources
- [Angular CLI Documentation](https://angular.dev/tools/cli)
- [Spring Boot Documentation](https://spring.io/projects/spring-boot)
---
## License
This project is licensed under the Apache License 2.0. See the [LICENSE](../apartment/LICENSE) file for details.