Giter Club home page Giter Club logo

scholarsome's Introduction

Hey there! ๐Ÿ‘‹

Gmail Badge

My name is Harrison, and I'm a software engineer ๐Ÿ› ๏ธ living in the United States. Passionate about containerization ๐Ÿ‹, open source :octocat:, and web architecture ๐ŸŒ. Always seeking new skills and opportunities to contribute to new projects!

Assortment of tech that I have experience in ๐Ÿ“

JavaScript Python Java PHP

Kubernetes Docker MariaDB Prisma

Linux Windows

NestJS Angular Express TypeScript


scholarsome's People

Contributors

bipin-codes avatar dependabot[bot] avatar hwgilbert16 avatar jayanth-parthsarathy avatar kilvny avatar mark2185 avatar samtv12345 avatar whyneet 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  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  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  avatar

Watchers

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

scholarsome's Issues

Cascading card updates and API isolation

Currently, existing knowledge of the structure of a set is needed to accurately update cards without breaking the ordering.

The primary method of adding cards should be via the /cards route instead of recreating every card in a set every time a single card needs to be updated.

Adding and updating cards should be relatively plug and play too. Indexes should not be able to be overwritten, there shouldn't be gaps in it, etc.

  • When updating or creating a card, if the index already exists, the card should be placed at the desired index, and the conflicting one pushed up -
  • When updating or creating a card, if the index is greater than the bottommost existing card, the new card should be one more than the bottommost
  • It should no longer be possible to update every card in a set via the sets controller. The cards controller should be used instead. Will leave this as an option for API users, but frontend will use more efficient method.
  • Cards controller should be nested under /sets/cards for clarity. Leitner cards should receive their own controller too and be nested under /leitner-sets/cards to show the relations between these two.
  • When editing a set, after saving, every single card component should not be recreated. This can be incredibly laggy on low-powered computers.

Quizzes rework

There's some deficiencies with quizzes that I would like to rework.

Biggest issue is with the written questions. The card editor's many formatting features and written quiz questions are at odds with each other. If a card contains formatting, images, or even a linebreak, it becomes incredibly difficult to verify whether an answer to a written quiz question is correct or not without just checking string similarity percentage. Realistically, only cards that are one line long with no formatting need to be marked as available for written quiz questions. Potentially, this can be shown to the user while making cards in a fashion similar to password strength indicators.

Additionally, the quiz creation modal should be brought back to the set page. It seems strange to have it alone on the page when it would look better to pop up on the main study set page.

Along the way, other improvements will be found.

Exclude HTML tags from written response answers

Written response quiz questions check for exact strings. Cards created using the new rich text editor include <p> tags, which are checked for.

These need to be removed before creating a quiz, or we need to filter the set beforehand to exclude these from being quizzed on.

Spaced repetition system

SRS is a large part of many other flashcard software, such as Anki. Scholarsomeโ€™s implementation of an SRS will be more user-friendly while still being just as powerful.

Learn mode

Add learn mode that dynamically adjusts to study progress.

First card is flipped to wrong side in progressive mode on mobile

When continuing rounds in the progressive flashcard mode, on mobile devices, the first card of the next round is flipped to the wrong side.

I suspect that this is because the :active attribute is not removed from the card element on mobile devices after being clicked.

Study set pagination

Large sets slow down the browser currently. The study set page should load an initial batch of cards, and load more as the users scrolls, in increments of ~30.

Importing Quizlet sets containing semicolons ; yields errors

If trying to import a Quizlet set that has semicolons in the term or definition, it yields a set not formatted correctly error. I don't know if there is a way to detect when a term or definition stops or ends, but I guess, the solution is to just go through the set and remove semicolons.

I guess also maybe setting custom breaks could work too, or maybe even let the user decide what the break character is, so they can assign it some obscure Unicode character that's never getting used?

Add settings page

Add new page to manage user settings.

  • Move avatar updating to this page
    • Add option to remove avatar and set it back to default user icon
  • Add UI for API keys
  • Add ability to change password without having to go through reset process
  • Add ability to change email

Sign up process still quite primitive

So I signed up, I never received the email (or it's been queued somewhere), there is no "send confirmation email again" button, if I click "sign up" again it tells me the email / username is already taken, but I can't login so it's a catch 22 situation

S3 and local storage internal wrapper

Currently, methods that interact with media files must check whether Scholarsome is setup to use local or S3-based storage. There should be a separate service to handle this logic so that something as simple as getFile(setId, filename) can be called instead.

Study games

Add simple games browser-based that help with study progress.

Would love to hear any ideas on what could be done with this. These will be simple HTML5 games, but should still be relatively engaging.

Custom startup console messages

The current messaging during startup is useful for development debugging, but it can be unintuitive for non-developer users attempting to troubleshoot their own install.

Nest serves Angular and Docusaurus as static files, so nothing needs to be modified with those applications. Only NestJS needs to have its default logging disabled in production. However, if NODE_ENV is development, we should leave the console messaging as it is right now.

Logging should be kept to a minimal. Likely, all that needs to be logged is when the application is starting, once it is finished, and any errors if they occur. If there's other situations when you feel a log is necessary, then feel free to add them. Errors can be logged as-is to the console. Colors can be used if they improve the experience - something like Scholarsome - [console message], with Scholarsome in purple.

I've provided a couple links below. For the implementation, I recommend implementing a custom logger service and using Winston as the logger, but you're welcome to use another logger or implementation if it works better.

Resources:

https://docs.nestjs.com/techniques/logger
https://www.npmjs.com/package/winston

Optimize API requests

Many pages currently query the API for data that isn't necessarily required.

For example, on the homepage, all of the user's sets are requested only for the purpose of putting in a text element that lists the number of cards in the set. However, users may have tens of sets each with hundreds of cards. This results in all of these sets being queried every time the user visits the homepage, adding additional network strain for little benefit.

The UI should be modified on certain pages to optimize API latency.

Reworked flashcards

In the current state, flashcards are more of a proof of concept than what they really should be.

The entire flashcards page needs to be reworked, and the page should ask users whether they knew the term or not after each flip, and to keep repeating until all cards have been known. This should persist between reloads.

Question about building docker image

Hey!

Loving the project so far, and I wanted to give the new Anki import a shot before it is released since I've got some decks there, but I'm unable to start the compose once I build the docker image manually.

So far I've only launched via docker compose --env-file .env up and that works, but I wanted to build the release branch and use that for the scholarsome service.
I just run docker build -t scholarsome . and replace the image: hwgilbert16/scholarsome with image: scholarsome, but I get an error, and it starts restarting (and looping):

scholarsome-mariadb-1      | 2023-07-04 17:07:53 3 [Warning] Aborted connection 3 to db: 'scholarsome' user: 'scholarsome' host: '172.21.0.4' (Got an error reading communication packets)
scholarsome-scholarsome-1  | 
scholarsome-scholarsome-1  | 10 migrations found in prisma/migrations
scholarsome-scholarsome-1  | 
scholarsome-scholarsome-1  | 
scholarsome-scholarsome-1  | 
scholarsome-scholarsome-1  | No pending migrations to apply.
scholarsome-scholarsome-1  | 
scholarsome-mariadb-1      | 2023-07-04 17:07:53 4 [Warning] Aborted connection 4 to db: 'scholarsome' user: 'scholarsome' host: '172.21.0.4' (Got an error reading communication packets)
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [NestFactory] Starting Nest application...
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] S3Module dependencies initialized +44ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] DatabaseModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] PassportModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] HttpModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] ServeStaticModule dependencies initialized +1ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM     LOG [InstanceLoader] UsersModule dependencies initialized +0ms
scholarsome-scholarsome-1  | [Nest] 119  - 07/04/2023, 5:07:55 PM   ERROR [ExceptionHandler] Region is missing
scholarsome-scholarsome-1  | Error: Region is missing
scholarsome-scholarsome-1  |     at resolveRegionConfig (/usr/src/app/node_modules/@aws-sdk/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js:9:15)
scholarsome-scholarsome-1  |     at new S3Client (/usr/src/app/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js:24:69)
scholarsome-scholarsome-1  |     at new S3 (/usr/src/app/node_modules/@aws-sdk/client-s3/dist-cjs/S3.js:194:1)
scholarsome-scholarsome-1  |     at createS3Connection (/usr/src/app/node_modules/nestjs-s3/dist/s3.utils.js:16:12)
scholarsome-scholarsome-1  |     at InstanceWrapper.useFactory [as metatype] (/usr/src/app/node_modules/nestjs-s3/dist/s3.core-module.js:33:58)
scholarsome-scholarsome-1  |     at Injector.instantiateClass (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:343:55)
scholarsome-scholarsome-1  |     at callback (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:53:45)
scholarsome-scholarsome-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
scholarsome-scholarsome-1  |     at async Injector.resolveConstructorParams (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:132:24)
scholarsome-scholarsome-1  |     at async Injector.loadInstance (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:57:13)
scholarsome-scholarsome-1 exited with code 0

What am I doing wrong?

P.S. I'd ask on some forum/discord, but couldn't find any info if there are such things.

Sets failing to save correctly when creating

Progress are not saved even save button was clicked when worked for too long.

Progress saved are deleted if you go back and forth from home to your set

Reloading page will delete all the progress >> it seems like it's having problem fetching data after paged refreshed.

it's having problem saving the data and retrieving data.

Improved profile page

Update profile page to see more statistics and improve the overall UI.

Profile pictures will be added, now that media is supported in sets.

Users not logged out after tokens expire

After the refresh token is expired and the authentication token no longer able to be refreshed, the user is logged out on the backend, but the frontend does not update immediately. This makes it appear that a user is logged in, but all authenticated requests will fail with a 401.

Instead, every router page change event should be used to check the status of the token, and update the frontend if the token is invalid.

Language Choice

Hi,
As an avid language learner, I would like to be able to select languages for a set. For example, I would like to learn the set "Vegetables" in Spanish and English. In this set there are included vegetable words like "lentils", "pepper" as words with their translation to Spanish. Therefore, I would need to be able to select both the source and destination language for the set.
The whole set then would contain words in English and their translation to Spanish.
Ideally, since I also learn other languages, such as Czech, I would like to be able to filter my sets by language. It would be great to be able to select my learning languages from a comprehensive list of all human languages (about 6,000).
I think language vocabulary learning is a feature that many people would like to use with Scholarsome. Therefore, inclusion of this feature in the basic version of Scholarsome would be very useful for many people.
Thanks,
-Thomas

v1.0.5 Release

v1.0.3/v1.0.4 was a large release - media support, Anki imports, rich text editing - it opens the door for a lot of bugs. Ideally, most of these should be mitigated before .5. The worst of them were fixed in .4, but there are likely still some lingering.

I'm still wrestling with whether .5 should include SRS functionalities, or if that entire feature should have a release reserved to itself. To say the least, it's going to take a lot of research before I want to push anything out that includes it.

Checklist

  • #23
  • #29
  • #18 - this one is certainly needed, as many imported Anki sets have >1000 cards. Mobile browsers will crash attempting to load this many in one go. - will be added in v1.0.6
  • #11 - this will be a large feature, any assistance is more than welcome. - will be in future release
  • a8724a9, 483f52c - improvements to card editing and studying user experience

Add env file schema

Can be difficult currently to diagnose errors that are rooted in missing env files. Would be best to validate this during startup and exit the application if the file is missing fields.

Import sets from Anki

Many users have large sets already at Anki. There should be the ability to import these sets without manual copy and pasting, just like the Quizlet import functionality.

API

Add ability to create API keys and add documentation for the existing internal API

Basic import and export features

Adding a basic export feature would improve interoperability with other apps, serve as simple backup feature and much more.

Similarly, having an import feature that accepts CSV or plain text formats with simple rules would make it easier for people to move their data into the platform. This change would also allow for faster creation of flashcards through typing them line by line instead of relying on clicking various buttons within the user interface.

Title editing?

I don't know if there is a way to edit the titles on existing sets, but that would be nice!

Unintended caching of failed Quizlet imports

Steps to recreate (As far as I know at least)

  1. Add an invalid formatted Quizlet export, which has a semicolon in a definiton (maybe term too, haven't checked)
  2. Attempt to import into Scholarsome. Fails as expected
  3. Fix error in Quizlet and re-export properly this time
  4. Attempt to import into Scholarsome. Improperly fails, even though it is valid
  5. Re-opening the import dialog and re-pasting doesn't fix it
  6. Refreshing (or maybe hard-refresh?) the page fixes it, trying to import the valid Quizlet export works as expected now

I think it would also be nice to have either a more detailed error message or like a highlighter telling you where and how it failed.

Originally posted by @RannyBergamotte in #74 (comment)

Multiple Choice

  1. SET will not be created if it only contains 1 CARD
  • For someone try to work things around, like how things works, it would take time
  • For the sake of trying out one configuration at a time, creator will lessen its struggle, whenever the creator is happy with the result, he/she will just repeat the configuration to his/her CARDS
  1. When creating cards there was no option for type of exam.
  • By default on flashcards (based on my observation), when flashcards is clicked, TERM will contain the the questions and choices while DEFENITION will have the answer, and vice versa.

  • When quiz was chosen, you'll be prompted to chose a type of exam, WRITTEN, TRUE/FALSE, MULTIPLE CHOICE.

  • Multiple choice is only available if you have 4 cards + unless it is grayed out.

  • If 4 cards are created, Multiple choice is available

  • ISSUE: Multiple choice is only available for 4 cards +

  • ISSUE: Multiple choice are randomized, jumping out from card to card

  • ISSUE: Listing items when tab is hit, it will change its format (e.g. number list > letter list), after saving, letter is not displayed, instead it displays numbers

is it possible if

  1. SET can be created even 1 CARD is created (for testing configurations)
  2. TERM and DEFINITION container should have an option for exam type (written, T/F, Multiple Choice)
  3. Fix listing options
    image_2023-11-24_080619613
    image_2023-11-24_080655512
    image_2023-11-24_080825053
    image_2023-11-24_080857568

Images not conforming properly on mobile

Large images do not resize automatically to their div's. They are set to their full height, but are cutoff by overflow restrictions. They need to downscale themselves automatically to fit a screen size.

Enhanced documentation

The documentation is currently only for installation and developer use. We should include pages for how to use the application in general.

Buttons retain active attribute after being clicked on mobile devices

After buttons are clicked, the active attribute appears to persist after the button press has finished when on mobile devices. This does not go away until the user clicks elsewhere.

Either the attribute needs to be removed after buttons are clicked, or the UI on mobile should be modified to not rely on background highlighting to present that a button has been interacted with.

remove members

needs close account

needs also close account after [n] days of inactivity
n = 365

  • same but within 30 days if nothing was made through it

honestly. i just registered with 10 min email to take a look [maybe disable that]

you should have a demo login for people who just wanna check it out. without registration

Migrate API to use OpenAPI/Swagger

In hindsight, this should have been done from the beginning, but this can be moved over now. The API should ideally use the OpenAPI specification, especially considering the plan to publicize the API in #7.

Request: Latex or other Math Support

I love this App, but the creation of new Cards is fairly limited.
Doing usefull physics cards is nearly impossible without a real Math implementation.
How hard would this be?

Regards

Permission sharing

Allow users to be able to share set editing permission with other users

Transition to reactive forms

Currently, all forms use native validation and template driven forms. For better UI, reactive forms with custom failure messages should be used instead.

Support diacritic letters with CSV import

When importing a CSV file that includes diacritic letters (such as รค), they display as the ๏ฟฝ replacement character instead. As a workaround, I am able to manually type diacritic letters into flashcards.

CSV file:
Finnish Nouns CSV

After import:
Finnish Nouns After Import

Developer documentation

Documentation should be added to the developer category that details how different workflows of Scholarsome operate.

Plugin System

Hi!
First of all, thanks for your great effort in creating Scholarsome. I have some ideas for adapting Scholarsome specifically to language vocabulary learning.
Since I think forking and then adapting Scholarsome to my ideas would be bad for everybody, I want to propose a better solution:
A plugin system.
Think of a plugin system like the extension system in VS Code or many other products. Independent developers extend the core platform with their own solution on top of the base product.
I think this could also work for Scholarsome, only here we would need to deal with a plugin system for both the API and then the frontend.
A plugin system would also prevent Scholarsome from becoming too bloated in the future. You only need to implement the features that are really needed in the core product, everything else could become a plugin.
One might even imagine a kind of marketplace some day.
What do you think about the plugin/extension idea?
Regards,
-Thomas

Improve registration experience

Users shouldn't be prohibited from logging in until they verify their email. Additionally, email verification resends should be available.

Save incomplete sets in browser

When creating a set, progress should not be lost when leaving the creation page. The content of the set should be stored in the browser temporarily until the user clicks create to create the set.

Edge case error handling

Add error handling and preemptive checking for:

  • Strings being too long Fixed in v1.2.0
  • Database responses that are assumed as valid

Export to .apkg

Users should not be locked into using Scholarsome sets once they have created ones here. It should be possible to export sets to a .apkg file.

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.