{"id":18513579,"url":"https://github.com/marko19907/urban-infusion-server","last_synced_at":"2026-04-11T05:31:41.536Z","repository":{"id":103773802,"uuid":"501630058","full_name":"Marko19907/urban-infusion-server","owner":"Marko19907","description":"Urban Infusion back-end, Application Development (IDATA2306), spring 2022.","archived":false,"fork":false,"pushed_at":"2022-06-12T10:21:40.000Z","size":8600,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T03:30:28.579Z","etag":null,"topics":["authentication","authorization","backend","derby-embedded","docker","docker-compose","heroku","https","java","jpa","jpa-hibernate","jwt","kotlin","maven","mysql","orm","rest-api","spring-boot","spring-security","swagger"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marko19907.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-09T11:46:47.000Z","updated_at":"2022-08-17T14:54:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef64de25-efc2-4f6b-9cec-fb5f8e728912","html_url":"https://github.com/Marko19907/urban-infusion-server","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2Furban-infusion-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2Furban-infusion-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2Furban-infusion-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2Furban-infusion-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marko19907","download_url":"https://codeload.github.com/Marko19907/urban-infusion-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254142598,"owners_count":22021565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","backend","derby-embedded","docker","docker-compose","heroku","https","java","jpa","jpa-hibernate","jwt","kotlin","maven","mysql","orm","rest-api","spring-boot","spring-security","swagger"],"created_at":"2024-11-06T15:39:25.234Z","updated_at":"2025-12-30T20:20:09.913Z","avatar_url":"https://github.com/Marko19907.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Urban Infusion server, group 7\n\nThis repository contains the backend made for the Urban Infusion project from NTNU's Application Development (IDATA2306) subject.\nThe project counts towards 100% of the final grade in the subject.\n\nThe front-end part can be found here: [https://github.com/Marko19907/urban-infusion-website](https://github.com/Marko19907/urban-infusion-website)\n\n[![Java CI with Maven](https://github.com/Marko19907/Urban-Infusion-server/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/Marko19907/Urban-Infusion-server/actions/workflows/maven.yml)\n\n### Built With\n* [Kotlin](https://kotlinlang.org) - A modern, cross-platform, statically typed, general-purpose programming language.\n* [Spring Boot](https://spring.io/projects/spring-boot) - Server framework used to build the REST API.\n* [Docker](https://www.docker.com) - Used to containerize the app.\n* [MySQL](https://www.mysql.com) - For the persistent database.\n* [Apache Derby](https://db.apache.org/derby/) - Used for the embedded database.\n* [HTTPS](https://www.rfc-editor.org/rfc/pdfrfc/rfc8446.txt.pdf) - Used for communications security in production.\n* [JWT](https://github.com/jwtk/jjwt) - As the authentication mechanism.\n\n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n### Prerequisites\n\nThis is a list of things you need in order to use this application.\n\n* **IntelliJ IDEA 2022.1.0 or newer**, necessary as Kotlin is bundled in the IDE, not needed if building directly with Maven\n* **JDK 17 or newer**, always needed\n* Docker is not needed\n* A database installation is not needed, the server can run in embedded mode with the Apache Derby database\n\n#### Downloading the project\n\n**Via HTTPS:**\n```sh\ngit clone https://github.com/Marko19907/Urban-Infusion-server.git\n```\n**Via SSH:**\n```sh\ngit clone git@github.com:Marko19907/Urban-Infusion-server.git\n```\nor download it directly as a zip from [here](https://github.com/Marko19907/Urban-Infusion-server/archive/refs/heads/main.zip).\n\n### Install methods\n\n#### GitLab Releases [Recommended]\n\n1. Download the latest build from this repository's [\"Releases\" page](https://github.com/Marko19907/Urban-Infusion-server/releases)\n2. Run the downloaded `.jar` with the CMD using the `java -jar nameOfTheJarFile.jar` command.\n3. The server should then start with an embedded database and be available at [http://localhost:8080](http://localhost:8080) \u003cbr\u003e\n   This is the preferred method.\n\n### Other installation methods\n\n#### Via IntelliJ\n\n1. Make sure you have installed the correct version of IntelliJ as specified in the [\"Prerequisites\"](#prerequisites) section.\n2. Download and the extract zip-file **or** clone project to the desired location as specified in the [\"Downloading the project\"](#downloading-the-project) section.\n3. Open the `pom.xml` file with IntelliJ.\n4. In IntelliJ, launch the `Application` class located in the `no.ntnu.webdev.webproject7` package.\n5. The server should then start with an embedded database and be available at [http://localhost:8080](http://localhost:8080)\n   \u003cbr\u003e\n   Options in other IDEs may vary.\n\n#### Via Maven in any IDE\n\n1. Clone **or** download the repo as a zip as specified in the [\"Downloading the project\"](#downloading-the-project) section.\n2. Run `mvn package` in the project folder with an IDE of your choice.\n3. Navigate to the `/target` folder and launch the generated `.jar` with the CMD.\n4. The server should then start with an embedded database and be available at [http://localhost:8080](http://localhost:8080)\n\n## Project structure\n\n```\nwebproject7\n├───configs\n├───controllers\n├───dto\n├───exceptions\n├───models\n├───repositories\n├───security\n├───serializers\n├───services\n└───utilities\n```\n\nWe have tried to keep the project organized by categorizing classes into packages by their respective domains. \n\n#### Configs\nContains the different configurations, for ex. cors and security configs\n\n#### Controllers\nHouses the controller classes that provide the REST endpoints for the app\n\n#### DTO\nContains all the different DTOs (Data Transfer Objects)\n\n#### Exceptions\nContains the different exceptions that are used to signal errors\n\n#### Repositories\nContains the repository classes tasked with connecting to the DB\n\n#### Security\nThe JWT implementation\n\n#### Serializers\nHouses the custom JSON deserializers that translate strings to enum types\n\n#### Services\nContains all the service classes that house the business logic\n\n#### Utilities\nContains mostly static functions that are used throughout the app \n\n## Database schema\n\nThe following is our database schema:\n\n\u003cimg src=\"assets/db-schema.svg\" alt=\"An image of the database schema\" width=\"700\"/\u003e\n\n## Project requirements\n\nThe application has two main roles:\n1. Admin\n2. User\n\nAn admin can do everything that a user can but admins can access extra functionality that is not available to users.\n\nA user can:\n\n* [x] Signup and log in\n* [x] View products\n* [x] Send in an order\n* [x] Write a comment for a product\n* [x] Edit their own comment\n* [x] See other user's comments\n\nAn admin can:\n\n* [x] Add a new product\n* [x] Update a product\n* [x] Delete a product\n* [x] See all user orders\n* [x] Mark an order as processed\n* [x] See all user comments for each product\n* [x] Delete any user comment\n\nOur app currently has a predefined admin user and a regular user used under testing:\n\n_Admin:_\n* username: admin\n* password: admin\n\n_User:_\n* username: user\n* password: user\n\nNote: These predefined users are **only** meant to be used for demo and development purposes, they should not be included in a real scenario.\n\n## Disclaimers\n\n* All product images used were fetched from [pngegg.com](https://www.pngegg.com) and are covered by their _non-commercial use only_ license.\n* The user images used in this project have been generated by an AI and do not depict any person currently alive or dead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarko19907%2Furban-infusion-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarko19907%2Furban-infusion-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarko19907%2Furban-infusion-server/lists"}