{"id":23300743,"url":"https://github.com/lukasz0104/word-learning-app","last_synced_at":"2026-04-06T08:01:45.130Z","repository":{"id":131580078,"uuid":"507018072","full_name":"Lukasz0104/word-learning-app","owner":"Lukasz0104","description":"[WORK IN PROGRESS] Web Application helping to learn vocabulary through flashcards, matching or typing.","archived":false,"fork":false,"pushed_at":"2023-04-11T21:40:49.000Z","size":703,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T21:37:03.678Z","etag":null,"topics":["angular","bootstrap","fullstack","h2","java","mssql","ng-bootstrap","spring-boot","sql-server","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Lukasz0104.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-24T13:20:37.000Z","updated_at":"2023-07-17T10:33:49.000Z","dependencies_parsed_at":"2023-06-10T16:15:46.000Z","dependency_job_id":null,"html_url":"https://github.com/Lukasz0104/word-learning-app","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Lukasz0104/word-learning-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasz0104%2Fword-learning-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasz0104%2Fword-learning-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasz0104%2Fword-learning-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasz0104%2Fword-learning-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lukasz0104","download_url":"https://codeload.github.com/Lukasz0104/word-learning-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasz0104%2Fword-learning-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["angular","bootstrap","fullstack","h2","java","mssql","ng-bootstrap","spring-boot","sql-server","swagger-ui"],"created_at":"2024-12-20T09:18:46.845Z","updated_at":"2026-04-06T08:01:45.083Z","avatar_url":"https://github.com/Lukasz0104.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word Learning App\n\n## About the project\n\nREST API created with Spring Boot and backed by SQL Server database. Enables creating, modifying, retrieving and\ndeleting learning sets and learning set items. User authentication is performed using Json Web Tokens passed\nin `Authorization` header. Users have a specific role for each learning set; the role is checked at the service level.\n\n## Technologies used\n\n- Spring Boot 2.7.1\n- Spring Data JPA 2.7.1\n- Spring Security 5.7.2\n- SQL Server database (also with support for embedded H2 database)\n\n## Spring profiles\n\nStarting the app without explicitly enabling any profiles will use the default configuration, that is, the app will try\nto establish connection to MSSQL database.\n\nThere are 3 additional profiles defined:\n\n- `swagger` - enables SwaggerUI\n- `dev` - prints SQL queries generated by Hibernate\n- `h2` - uses embedded H2 database instead of MSSQL\n\nTo enable any of those profiles you can either:\n\n1. Set the value of `SPRING_PROFILES_ACTIVE` environmental variable with a comma separated list of active profiles and\n   then run the jar file. For example:\n\n    ```bash\n    export SPRING_PROFILES_ACTIVE=swagger,dev\n    java -jar target/wordapp*.jar\n    ```\n\n2. Run jar file with option `-Dspring.profiles.active`. For example:\n\n    ```bash\n    java -jar -Dspring.profiles.active=h2,swagger target/wordap*.jar\n    ```\n\nIf starting the app with IntelliJ IDEA, you can specify active profiles by modifying run configuration.\n\n## .env file\n\nFor application to run you have to create a `.env` file and supply values for all variables listed\nin [`.env.example`](.env.example).\n\n### Description of required environment variables\n\n| Name                     | Data type | Description                                                                            |\n|--------------------------|-----------|----------------------------------------------------------------------------------------|\n| `DB_HOST`                | string    | Used in database connection string. In most cases this will be set to `localhost`      |\n| `DB_USERNAME`            | string    | Database user                                                                          |\n| `DB_PASSWORD`            | string    | Password to connect to db                                                              |\n| `POPULATE_DB`            | bool      | Flag indicating whether to execute `data.sql` when using database in container         |\n| `SPRING_PROFILES_ACTIVE` | string[]  | Set active profiles when running in container. See [Spring profiles](#spring-profiles) |\n| `JWT_SECRET`             | string    | Secret value used for signing JWTs                                                     |\n| `JWT_EXPIRATION_TIME`    | integer   | Specifies JWTs' validity (in seconds)                                                  |\n\n## Roles\n\nIn order to read contents of public sets, users do not need any roles. However, to access contents of private sets or to\nperform any operation a specific role is required in this set. The roles with resulting authorities are listed in the\nfollowing table:\n\n| Role      | Can read (applies only to private sets) | Can propose changes | Can edit and approve/reject changes |  Can manage roles  |\n|-----------|:---------------------------------------:|:-------------------:|:-----------------------------------:|:------------------:|\n| `READER`  |           :heavy_check_mark:            |                     |                                     |                    |\n| `PROPSER` |           :heavy_check_mark:            | :heavy_check_mark:  |                                     |                    |\n| `EDITOR`  |           :heavy_check_mark:            | :heavy_check_mark:  |         :heavy_check_mark:          |                    |\n| `OWNER`   |           :heavy_check_mark:            | :heavy_check_mark:  |         :heavy_check_mark:          | :heavy_check_mark: |\n\n## Using SwaggerUI\n\nIf `swagger` profile was enabled, we can access SwaggerUI by navigating\nto [localhost:8080/swagger-ui/index.html](localhost:8080/swagger-ui/index.html). In order to authenticate one needs to\nsend a request to `/login` with valid credentials. If database was populated with sample data, passwords can be found in\nthe comments in [data.sql](database/data.sql) file. If database wasn't populated with data, one has to register first.\nAfter successful authentication there should be an `authorization` header, of the form  \n`authorization: Bearer {TOKEN}`,  \nin the response. Copy the `TOKEN` and paste it into *Available authorizations* modal dialog that appears after clicking\non green *Authorize* button. Swagger will then add appropriate header when accessing endpoints with closed black\npadlock (next to arrow pointing down).\n**BE CAREFUL NOT COPY ANY TRAILING OR PRECEDING SPACES**\n\n## Running MSSQL database with Docker/Podman\n\n**Note:** Database may take up to 60s to start and create tables.\n\n```bash\n# build the image\npodman build -t db ./database/\n\n# start the container:\npodman run -d -p 1433:1433 --env-file .env --name wordapp-db db\n```\n\n```bash\n# stop container\npodman stop wordapp-db\n\n# remove container\npodman container rm wordapp-db\n```\n\n## Running the app with Docker/Podman\n\n```bash\n# build jar file\nmvn clean package # if maven is installed\n\n./mvnw clean package\n\n# build the image\npodman build -t app .\n```\n\n```bash\n# start the container\npodman run -d -p 8080:8080 --env-file .env --name wordapp app\n```\n\nIf database is running in container use the following command:\n\n```bash\npodman run -d -p 8080:8080 --env-file .env -e SPRING_PROFILES_ACTIVE=swagger --name wordapp --network=host app\n```\n\n```bash\n# stop the container\npodman stop wordapp\n\n# remove the container\npodman container rm wordapp\n```\n\n## Running using docker-compose\n\n```bash\n# build\npodman-compose build\n\n# start\npodman-compose up -d\n\n```\n\n```bash\n# stop\npodman-compose down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasz0104%2Fword-learning-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukasz0104%2Fword-learning-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasz0104%2Fword-learning-app/lists"}