Developed by Sparta Engineering Academy: Riya, Max, Justin, Abdulhadi, Fransico, Calum, Gurjeev, Igran, Chung, Ioannis, James, Lucas, Ricardo, Will, Michalis, John, Maria, Hamzah, Mohamed.
This project is developed as a team of 19, building a RESTful API connected to a Mongo database that allows for CRUD operations requested by the user. The structure of the RESTful API uses MVC model and Swagger is used to display the API endpoint requests. Also creating a testing framework structure (Service Object Model), using Jackson, BDD Development and Cucumber, Rest-Assured, implementing JUnit and Hamcrest Tests, as well as using mocking to test the framework. We also made use of a singleton logger to log the classes.
The project's functionality is using a MongoDB and cloud-based solution for accessing information about movies, allowing users to post or read comments on movies and managing a film schedule for theaters. Also building a testing framework to test the MongoDB API for testers to use.
- IntelliJ IDEA (Ultimate Edition)
- Spring
- Maven
- spring-boot-starter-web
- spring-boot-starter-data-mongodb
- spring-boot-starter-hateoas
- springdoc-openapi-ui
- spring-boot-starter-test
- cucumber-java
- cucumber-junit
- junit-vintage-engine
- To build a RESTful API which allows full CRUD access to the existing data for these 4 collections
- The sample database (sample_mflix) which includes details of movies, comments, "theaters" and users.
- Create an API testing framework which checks the REST service is working and provides a BDD layer
Clone the repository
git clone https://github.com/JamesKempadoo/Mfix_MongoDB_API.git
Check Maven dependancies are installed
Edit application.properties with your DB URI
spring.data.mongodb.uri=mongodb+srv://<user>:<pass>@yourCluster.mongodb.net/?retryWrites=true&w=majority
spring.data.mongodb.database=sample_mflix
database.uri=mongodb+srv://<user>:<pass>@yourCluster.mongodb.net/sample_mflix
Run application via MfixMongoDbApiApplication.java
-
controller
- CommentsController
- MovieController
- SessionsController
- TheaterController
- UserController
-
exceptions
- ControllerExceptionHandler
- NoTheaterFoundException
- ResourceException
- IDNotFoundException
-
logging
- CustomConsoleHandler
- CustomFileHandler
- CustomFilter
- CustomFormatter
- CustomLoggerConfiguration
- Log
- LoggerSingleton
- LoggingExample
-
model
- DBConfig
- MongoConfig
-
entity
- Comment
- imdb
- Movie
- Theater
- Tomato
- User
- Viewer
-
theater
- Address
- Geo
- Location
- Theater
-
repositories
- CommentRepository
- MovieRepository
- TheaterRepository
- UserRepository
-
connection
- ConnectionManager
- ConnectionResponse
-
Cucumber
- CommentStepdefs
- MovieStepdefs
- TestRunner
- TheatreStepdefs
- UserStepdefs
-
dto
-
comments
- CommentsDTO
-
movie
- imdb
- MovieDTO
- Tomatoes
- Viewer
-
theater
- Address
- Geo
- Location
- TheaterDTO
-
User
- UserDTO
-
Exceptions
- ConnectionManagementException
- InjectorException
-
framework_test
- FrameworkTest
- TheaterDTOTest
- MovieDTOTest
- UserDTOTest
-
controller_test
- UserControllerTest
-
injection
- Injector
-
services
- Services