The online platform for NIAEFEUP.
Below, you can find a quickstart guide with development setup and project structure. For additional information about any implementation or usage details, please refer to our Wiki Page.
Simply load the Gradle project and run the application.
For automatic restart to fire up every time a source file changes, make sure that Build project automatically
under File | Settings | Build, Execution, Deployment | Compiler
is checked.
Run the following command in your shell:
./gradlew bootRun
We use ktlint
to ensure a consistent coding style according to the community standards, through a Gradle plugin.
Although IntelliJ does not provide linting suggestions for Kotlin out of the box, you can use a third-party plugin to run the linter at real time.
You can fire up the analysis yourself by running in your shell:
./gradlew ktlintCheck
You can fix the lint automatically by running in your shell:
./gradlew ktlintFormat
You can setup a local precommit git hook for lint analysis running a Gradle task provided by the used linting plugin:
./gradlew addKtlintCheckGitPreCommitHook
Or even an auto-format hook, if that is your thing:
./gradlew addKtlintFormatGitPreCommitHook
Run the test suite as usual, selecting the respective task for running.
Run the following command in your shell:
./gradlew test
API documentation is generated through the use of the Spring REST Docs API specification Integration (aka restdocs-api-spec), a Spring Rest Docs extension that builds an OpenAPI specification or a Postman collection from its description, included in the controller tests. To see examples of how to document the API, hop to one of the controller tests and read the API documentation wiki page.
Find the current version of the API documentation here.
The Postman collection is also available here.
Run the generateDocs
gradle task to generate the OpenAPI specification or the Postman collection.
Run the following command in your shell:
./gradlew generateDocs
Find the OpenAPI specification and Postman collection under docs/
after running the task.
src/main
backend/
- Contains all the source code (excluding tests and resources)config/
- Configuration classes used at bootcontroller/
- Methods that register endpoints for the appmodel/
- Database entity models (Spring Data JPA entities)dto/
- Data Transfer Objects for creating and modifying entitiesrepository/
- Data access layer methods (Spring Data repositories)service/
- Business logic for the controllersutils/
- Auxiliary packages used in the projectextensions/
- Extension functions used throughout the projectvalidation/
- Custom validations used across the different models
resources/
- All assets and static files needed, including static configurations
src/test/
- Self explanatory: unit tests, functional (end-to-end) tests, etc.