Skip to content

App for keeping track of where you were with watching TV series, movies, or video games.

License

MIT, Unlicense licenses found

Licenses found

MIT
LICENSE
Unlicense
LICENSE.md
Notifications You must be signed in to change notification settings

joostvdg/where-was-i

Repository files navigation

Project Base for Vaadin and Spring Boot

This project can be used as a starting point to create your own Vaadin application with Spring Boot. It contains all the necessary configuration and some placeholder files to get you started.

The best way to create your own project based on this starter is start.vaadin.com - you can get only the necessary parts and choose the package naming you want to use.

TODO

  • Trigger Restart GHA from Slack
  • Export / Import Database tests
  • Ability to remove items from the watchlist
    • active/inactive
  • Integration tests
  • Move Database to Supabase

SlackBot for GHA

Yes, you can use the GitHub Slack app to trigger GitHub Actions workflows directly from Slack. Here are the steps to set it up:

  1. Install the GitHub Slack app:
  • Go to the GitHub Slack app page and click "Add to Slack".
  • Follow the instructions to connect your GitHub account to Slack.
  1. Configure the GitHub Slack app:
  • Once installed, you can configure the app to listen to specific repositories and channels.
  • Use the /github subscribe owner/repo command in Slack to subscribe to a repository.
  1. Trigger GitHub Actions workflows:
  • You can trigger workflows using the /github run workflow command.
  • For example, to trigger a workflow named build-and-deploy.yml, you can use:
    /github run workflow build-and-deploy.yml
    

This setup allows you to manage and trigger your GitHub Actions workflows directly from Slack, making it easier to integrate your development workflow with your communication tools.

Native Image

sdk install java 23.0.1-graal
mvn -Pproduction -Pnative native:compile

Doesnt Work

2024-12-07T14:11:38.633+01:00  WARN 52773 --- [where-was-i] [           main] w.s.c.ServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'watchlistServiceImpl': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'flyway': Instantiation of supplied bean failed
2024-12-07T14:11:38.633+01:00  INFO 52773 --- [where-was-i] [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'watchlistServiceImpl': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'flyway': Instantiation of supplied bean failed
        at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveAutowiredArgument(BeanInstanceSupplier.java:345)

Running the Application

There are two ways to run the application : using mvn spring-boot:run or by running the Application class directly from your IDE.

You can use any IDE of your preference,but we suggest Eclipse or Intellij IDEA. Below are the configuration details to start the project using a spring-boot:run command. Both Eclipse and Intellij IDEA are covered.

Docker

export VERSION=0.1.0
make docker
docker run -i --rm \
  --name where-was-i \
  -p 8080:8080 \
  -e SPRING_PROFILES_ACTIVE=production \
  -e JDBC_DATABASE_URL=jdbc:postgresql://172.19.0.1:6543/wherewasi \
  ghcr.io/joostvdg/where-was-i:$VERSION

Eclipse

  • Right click on a project folder and select Run As --> Maven build.. . After that a configuration window is opened.
  • In the window set the value of the Goals field to spring-boot:run
  • You can optionally select Skip tests checkbox
  • All the other settings can be left to default

Once configurations are set clicking Run will start the application

Intellij IDEA

  • On the right side of the window, select Maven --> Plugins--> spring-boot --> spring-boot:run goal
  • Optionally, you can disable tests by clicking on a Skip Tests mode blue button.

Clicking on the green run button will start the application.

After the application has started, you can view your it at http://localhost:8080/ in your browser.

If you want to run the application locally in the production mode, use spring-boot:run -Pproduction command instead.

Running Integration Tests

Integration tests are implemented using Vaadin TestBench. The tests take a few minutes to run and are therefore included in a separate Maven profile. We recommend running tests with a production build to minimize the chance of development time toolchains affecting test stability. To run the tests using Google Chrome, execute

mvn verify -Pit,production

and make sure you have a valid TestBench license installed.

Structure

Vaadin web applications are full-stack and include both client-side and server-side code in the same project.

Directory Description
src/main/frontend/ Client-side source directory
    index.html HTML template
    index.ts Frontend entrypoint
    main-layout.ts Main layout Web Component (optional)
    views/ UI views Web Components (TypeScript / HTML)
    styles/ Styles directory (CSS)
src/main/java/<groupId>/ Server-side source directory
    Application.java Server entrypoint
    AppShell.java application-shell configuration

GitHub Principal Attributes

  • login: joostvdg
  • id: 539630
  • name: Joost van der Griendt

Useful links

Setup GHA / S3

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:ListBucket",
      "Resource": "arn:aws:s3:::where-was-i-backups"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::where-was-i-backups/*"
    }
  ]
}

About

App for keeping track of where you were with watching TV series, movies, or video games.

Resources

License

MIT, Unlicense licenses found

Licenses found

MIT
LICENSE
Unlicense
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •  

Languages