Coder Social home page Coder Social logo

kaethorn / alfred Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 1.0 22.43 MB

Manage & read your comics

Home Page: https://alfred.cx

Java 42.45% JavaScript 2.73% TypeScript 48.25% HTML 5.07% Dockerfile 0.10% Sass 1.41%
comicrack comics-reader docker comic comic-books library-management-system comic-library

alfred's People

Contributors

dependabot[bot] avatar kaethorn avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nosirus

alfred's Issues

Improve comic tile view

Pages /bookmarks and /library/*/volumes need improved display of comic tiles:

  1. Mobile portrait mode: One column, stacked
  2. Tablet landscape mode: Two columns, side by side
  3. Desktop landscape mode: Available columns

All columns should display comic covers horizontally centered.

Handle library URLs with slashes

The following URL cannot be matched:

library/publishers/Amalgam%20Comics/series/DC%20Versus%20Marvel/Marvel%20Versus%20DC/volumes

Handle publishers, series and volume names with /, e.g. URL-encode them. Double check routing for any other URLs that might be affected by this bug.

Is there any way to run this without the gmail login...

I'm struggling to get the google sign-in to work.

After having setup a gmail account for the user login, and setting up some form of app in order to get a client ID, I still don't know where to find the auth.jwt.secret.
My users (family) don't have gmail accounts (IOS users) and are unlikely to get one just to access this app.
I might use it for myself if I could work out what is needed to get it going.

The alfred and mongo containers run fine and appear to be linked.
I just can't login.. (nothing happens when I click on the login button) and nothing is recorded in the logs)

Is there any way to just have a login and password to access the app? (or maybe a quick runthru of what I need to do to get the required credentials)

Thanks

Loading feedback

Implement loading & processing feedback.

Priority list:

  • Error queue load: Disable buttons while items are being loaded (e.g. after a fix)
  • Error fix: disable item while being fixed
  • Library list load
  • Volume issues list load

Fails to Run and connect to Mongo Fully

I already have Mongo with Manga_Tagger Docker setup (image: mongo:4.2.19) and I passed the info to login via the URI but I get a bunch of errors and Alfred doesn't start.

      - SPRING_PROFILES_ACTIVE=prod
      - SPRING_DATA_MONGODB_URI=mongodb://manga_tagger:[email protected]/alfred
 :: Spring Boot ::        (v2.3.1.RELEASE)
2022-10-05 23:48:34.333  INFO 1 --- [           main] de.wasenweg.alfred.AlfredApplication     : Starting AlfredApplication on 2f8e53105511 with PID 1 (/app started by root in /)
2022-10-05 23:48:34.336 DEBUG 1 --- [           main] de.wasenweg.alfred.AlfredApplication     : Running with Spring Boot v2.3.1.RELEASE, Spring v5.2.7.RELEASE
2022-10-05 23:48:34.337  INFO 1 --- [           main] de.wasenweg.alfred.AlfredApplication     : The following profiles are active: prod
2022-10-05 23:48:35.789  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2022-10-05 23:48:35.986  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 192ms. Found 5 MongoDB repository interfaces.
2022-10-05 23:48:36.980  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-10-05 23:48:36.993  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-10-05 23:48:36.993  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.36]
2022-10-05 23:48:37.141  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-10-05 23:48:37.141  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2734 ms
2022-10-05 23:48:37.660  INFO 1 --- [           main] org.mongodb.driver.cluster               : Cluster created with settings {hosts=[10.1.1.10:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
2022-10-05 23:48:37.772  INFO 1 --- [10.1.1.10:27017] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:1, serverValue:72}] to 10.1.1.10:27017
2022-10-05 23:48:37.779  INFO 1 --- [10.1.1.10:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=10.1.1.10:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=8, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=4376435}
2022-10-05 23:48:38.316  INFO 1 --- [           main] org.mongodb.driver.connection            : Closed connection [connectionId{localValue:2}] to 10.1.1.10:27017 because there was a socket exception raised by this connection.
2022-10-05 23:48:38.319  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'comicController' defined in file [/app/de/wasenweg/alfred/comics/ComicController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'comicService' defined in file [/app/de/wasenweg/alfred/comics/ComicService.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scannerService' defined in file [/app/de/wasenweg/alfred/scanner/ScannerService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiMetaDataService' defined in file [/app/de/wasenweg/alfred/scanner/ApiMetaDataService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'comicVineService' defined in file [/app/de/wasenweg/alfred/scanner/ComicVineService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsService': Invocation of init method failed; nested exception is org.springframework.data.mongodb.UncategorizedMongoDbException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='manga_tagger', source='alfred', password=<hidden>, mechanismProperties=<hidden>}; nested exception is com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='manga_tagger', source='alfred', password=<hidden>, mechanismProperties=<hidden>}
2022-10-05 23:48:38.324  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2022-10-05 23:48:38.344  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-10-05 23:48:38.348 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'comicController' defined in file [/app/de/wasenweg/alfred/comics/ComicController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'comicService' defined in file [/app/de/wasenweg/alfred/comics/ComicService.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scannerService' defined in file [/app/de/wasenweg/alfred/scanner/ScannerService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiMetaDataService' defined in file [/app/de/wasenweg/alfred/scanner/ApiMetaDataService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'comicVineService' defined in file [/app/de/wasenweg/alfred/scanner/ComicVineService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsService': Invocation of init method failed; nested exception is org.springframework.data.mongodb.UncategorizedMongoDbException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='manga_tagger', source='alfred', password=<hidden>, mechanismProperties=<hidden>}; nested exception is com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='manga_tagger', source='alfred', password=<hidden>, mechanismProperties=<hidden>}

Paginate covers page

Loading all front- and back covers for all comics is not feasible.

Either by:

  1. Text filtering
  2. Scoping by volume

or a combination of both.

Using ion-virtual-scroll might help as well.

Add Docker hub images

Please add docker hub images. x86, ARMHF, and ARM64 if possible.

Thanks.

Looking forward to trying this out.

Peristence

Choose a persistent DB instead of in memory H2. Document based DB might be more performant.

Relations to consider:
has one
has one
has many open at position => ?

Not able to get the image

$ docker pull de.wasenweg/alfred
Using default tag: latest
Error response from daemon: Get https://de.wasenweg/v2/: dial tcp: lookup de.wasenweg: no such host

Is the host down?

Install on Windows 10 ?

Hello,

I'm a noob.
Your work seems interesting but could you explain a little more how to run it on a PC with Windows 10 ?

Thank you !

Handle image load error

When an image cannot be loaded when opening a comic book, the following could happen:

  1. A page is blank. This happens when opening a comic for the first time and the error occurred in the first round (before caching).
  2. The volume is not cached successfully. This happens when the error occurs while caching.

There a various issues that need to be solved:

  1. Prevent loading the current comic book twice (once for reading and once for caching) and instead just wait until it is cached and read it from cache entirely.
  2. React when caching failed and prompt for a retry (or retry silently when it's not the current issue).
  3. Make subsequent volume caching faster by only caching images that are missing.

Blank webpage?

I successfully created the image and ran the application and when I go to localhost:5000 I end up with a blank page. The tab identifies it as Alfred with the Alfred icon, but there's no content. Docker also shows mongo as running but de.wasenweg/alfred as exited. Am I doing something wrong? I'm a bit of a noob with this stuff. Thanks!

Split Progress and Comic information

Currently, the UI expects all progress information to be part of Comic data whereas the backend stores progress information in a separate collection. In order to achieve that, the backend models a Comic to have transient progress attributes and populates them with information in the Progress collection before returning it to the UI.

For example, the UI knows about the current user and stores progress directly in the Comic data when sending updates to the backend which has to read out the relevant attributes and map them to the principal in order to store them in the Progress collection. Similarly, when the UI fetches a comic, it expects it to contain progress information for the current user.

This appeared to be convenient at first, but turned out to yield a couple of pitfalls, one of which is caused by the fact that the backend models Comic to have Progress attributes that are persisted whenever a comic is saved, so when fetching that comic it would appear to contain progress information even when no Progress information was merged in.

This can be solved by removing progress attributes from Comic (namely read, currentPage and lastRead). This will require one of the following changes:

  1. Provide a DTO that contains the removed attributes. This would at least solve the immediate issue. This way DB aggregation does not need to be touched.
  2. Provide new /api/progress end points for the UI which has to explicitly manage progress. DB aggregation will break and might need $lookup instead of mergeObjects.

Caching

Figure out a caching strategy:

  • in memory, self handled and capped
  • file based, self handled and capped
  • hybrid
  • Spring @Cacheable
  • 3rd party library
    Caching is highly educated because once a comic is open at a specific page, access is linear from that point as either the previous or next page is opened. Random access is seldom and can be slow.

So a strategy would look like this:

  1. Once a page is openend, cache the next page immediately.
  2. Evict pages that are behind more than one position.
    This would mean that once at each turn of a page, the zip would have to be opened and an image extracted. This might cause I/O overhead.
    Alternatively, a comic could be extracted to the file system entirely at first access and kept there until a
    predefined timeout (30m). This would probably require a scheduled clean up task.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.