crowdproj / opentutor Goto Github PK
View Code? Open in Web Editor NEWOpenTutor - a flashcard system to learn words
OpenTutor - a flashcard system to learn words
users
and DbUserRepository
; keycloak will manage users, we need only user's UUID in dictionaries
table:db-api
; move repositories to that module:common
DTO's; need to make their own DTO'scurrently a user can theoretically access another user's data
for parts of speech see
test-en-ruEnRu.xml.txt
fluentbit or fluentd could be better candidates for monitoring.
now we can download & upload lingvo-xml, this functionality almost useless (who uses lingvo desktop? I think no one).
on the other hand, export & import full data must be useful
it is better to control these options via run options, having two mechanisms simultaneously is inconvenient and makes little sense
it was fine, but now after successful login, calling the API results a 401 error
Keycloak logs:
2024-06-15 15:17:23 2024-06-15 12:17:23,870 WARN [org.keycloak.protocol.oidc.utils.OAuth2CodeParser] (executor-thread-3) Code 'b079eece-82b8-41ef-a062-77100e1f9f1e' already used for userSession 'fe070419-2860-42ca-a376-6c55c3eaf1ca' and client 'dd87e434-f444-44af-84ef-46c57801ad5a'.
2024-06-15 15:17:23 2024-06-15 12:17:23,871 WARN [org.keycloak.events] (executor-thread-3) type="CODE_TO_TOKEN_ERROR", realmId="flashcards-realm", clientId="flashcards-client", userId="null", sessionId="fe070419-2860-42ca-a376-6c55c3eaf1ca", ipAddress="172.20.0.1", error="invalid_code", grant_type="authorization_code", code_id="fe070419-2860-42ca-a376-6c55c3eaf1ca", client_auth_method="client-secret"
docker-compose -f docker-compose-app.yml up flashcards-db flashcards-keycloak flashcards-app
(or just docker-compose -f docker-compose-app.yml up
)curl --location 'http://localhost:8081/realms/flashcards-realm/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=flashcards-client' \
--data-urlencode 'username=demo' \
--data-urlencode 'password=demo' \
--data-urlencode 'grant_type=password'
send POST to server:
curl --location 'http://localhost:8080/v1/api/dictionaries/get-all' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{"requestId":"9BEBD87D-A41B-724A-D4C9-42A83432A5E4","requestType":"getAllDictionaries"}'
keycloak admin console: localhost:8081 dev:dev
realm: https://github.com/crowdproj/opentutor/blob/main/tutor-deploy/data/keycloak/flashcards-realm.json
Dockerfile: https://github.com/crowdproj/opentutor/blob/main/tutor-deploy/keycloak.Dockerfile
Web-client: https://github.com/crowdproj/opentutor/blob/main/frontend/src/main/resources/static/api.js#L35
Web-server: https://github.com/crowdproj/opentutor/blob/main/app-ktor/src/main/kotlin/AppMain.kt#L92
App-settings: https://github.com/crowdproj/opentutor/blob/main/app-ktor/src/main/resources/application.conf#L30
flash-cards client:
languages
table: it can be replaced by local data, e.g. using java.util.Locale.getAvailableLocales()
examples
and translations
tables: add corresponding columns to cards
table, i.e. cards#examples
(json), cards#translations
(jsonb)cards
columns: forms
(jsonb), statistics
(json), details
(json) (+ created
(datetime), updated
(datetime) ?)dictionaries
columns: settings
(+ created
(datetime), updated
(datetime) ?)users
columns: settings
select several dictionaries for run flashcards
for new users it would be convenient to have some ready dictionaries (irregular verbs, weather)
the database model has been changed (see #10 ), in :core and :front there should be new entities as well
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.