https://github.com/venki1402/cinewiki
A Movie Director Management System
https://github.com/venki1402/cinewiki
java spring
Last synced: about 2 months ago
JSON representation
A Movie Director Management System
- Host: GitHub
- URL: https://github.com/venki1402/cinewiki
- Owner: Venki1402
- License: mit
- Created: 2025-05-07T15:07:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-08T00:22:00.000Z (about 1 year ago)
- Last Synced: 2025-05-11T23:04:48.537Z (about 1 year ago)
- Topics: java, spring
- Language: Java
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CineWiki - A Movie Directory Application
## Problem Statement
CineWiki is a web-based movie directory application designed to manage and showcase information about movies and their directors. The application addresses the need for:
- Organizing and maintaining a structured database of movies and directors
- Establishing relationships between movies and their respective directors
- Providing an intuitive interface for managing movie and director information
- Enabling easy access to movie details and director filmographies
## Architecture
### Technology Stack
- **Backend**: Spring Boot 3.2.3
- **Frontend**: JSP with Bootstrap 5
- **Database**: MySQL
- **Build Tool**: Maven
- **Java Version**: 21
### Project Structure
```
cinewiki/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com.example.cinewiki/
│ │ │ ├── controller/
│ │ │ ├── model/
│ │ │ ├── repository/
│ │ │ └── service/
│ │ ├── resources/
│ │ │ └── application.properties
│ │ └── webapp/
│ │ └── WEB-INF/
│ │ └── views/
│ └── test/
│ └── java/
└── pom.xml
```
### Key Components
1. **Models**:
- Movie (id, title, releaseYear, genre, plot, budget, boxOffice)
- Director (id, name, birthDate, nationality)
2. **Controllers**:
- MovieController
- DirectorController
3. **Services**:
- MovieService
- DirectorService
4. **Repositories**:
- MovieRepository (JPA)
- DirectorRepository (JPA)
## APIs
### Movie Endpoints
| Method | URL | Description |
|--------|-----|-------------|
| GET | `/movies` | List all movies |
| GET | `/movies/new` | Show movie creation form |
| POST | `/movies` | Create new movie |
| GET | `/movies/{id}` | Show movie details |
| GET | `/movies/{id}/edit` | Show movie edit form |
| POST | `/movies/{id}` | Update movie |
### Director Endpoints
| Method | URL | Description |
|--------|-----|-------------|
| GET | `/directors` | List all directors |
| GET | `/directors/new` | Show director creation form |
| POST | `/directors` | Create new director |
| GET | `/directors/{id}` | Show director details |
| GET | `/directors/{id}/edit` | Show director edit form |
| POST | `/directors/{id}` | Update director |
## Screenshots
### Home

### Movie Management
- **Create Movie**

- **List Movies**

- **Detail View**

- **Edit Movie**

### Director Management
- **Create Director**

- **List Directors**

- **Detail View**

- **Edit Director**

## Tests
### Unit Tests
The application includes comprehensive unit tests for:
- Repository layer (using H2 in-memory database)
- Service layer
- Controller layer
### Test Coverage
- MovieRepositoryTest
- testFindByDirectorId
- testFindAllMoviesWithDirectors
- testSaveMovie
- testDeleteMovie
- testFindById
- DirectorRepositoryTest
- testFindById
- testSaveDirector
- testDeleteDirector
- testFindAllDirectors
- MovieServiceTest
- testGetAllMovies
- testGetMovieById
- testSaveMovie
- testDeleteMovie
- testGetMoviesByDirectorId
- DirectorServiceTest
- testGetAllDirectors
- testGetDirectorById
- testSaveDirector
- testDeleteDirector
- MovieControllerTest
- testListMovies
- testCreateMovie
- testUpdateMovie
- testDeleteMovie
- testShowMovieDetails
- DirectorControllerTest
- testListDirectors
- testCreateDirector
- testUpdateDirector
- testShowDirectorDetails
### Running Tests
```
# Run all tests
mvn test
# Run specific test class
mvn test -Dtest=MovieRepositoryTest
# Run with coverage report
mvn test jacoco:report
```
## Setup and Installation
1. Clone the repository
```
git clone https://github.com/Venki1402/cinewiki
```
2. Configure MySQL database
```
spring.datasource.url=jdbc:mysql://localhost:3306/cinewiki_db
spring.datasource.username=root
spring.datasource.password=root
```
3. Build the project
```
mvn clean install
```
4. Run the application
```
mvn spring-boot:run
```
5. Access the application at `http://localhost:8080`