Giter Club home page Giter Club logo

opentutor's Introduction

CrowdProj project

This is an experimental project to create an Open Source social network aka Marketplace in a highly modular style.

Roadmap

Group / Subsystem Microservice Purpose Contributors Completeness
Ads Ads User ads control. Users dispose texd descriptions of their demands or supplies to be met one another @svok 20%
Product
Product Group Microservice for description of a products group. For instance, group "Refrigerators" has specific properties like color, weight, minimum temperature, etc. @phaeton03 75%
Product Model Microservice for description of a product model. For instance, model "Refrigerator M-123" has specific values of the properties like weight is 30 kg, minimum temperature is -20 C, etc.
Product Property Microservice for managing product properties. Properties have name, description, units of measure, etc. @Riafka 70%
Product Property Value
References Units @fooglish 70%
Comments Comment A microservice for managing comments feature for any object (article, product, news, etc.) @StellaLupus
Ratings Ratings @shvetson 75%
Vote
Resource planner Calendar allows to plan access to some limited resources like computers, labour, time, etc.
Resources Reference for the available resources @Zuzichev
Resource Schedule Template Timeslots distribution over time, including specification of the working days, holidays and weekends @elakovnick24
Resource Bookings Available and booked timeslots must be controlled by this entity @kulabuha
Events Event specifies the detail about the booking for the resources and lists the timeslots for the resources
Library Library is a subsystem for management of different resources: video, music, documents, custom files, etc.
Documents Reference of stored documents
Stored Resources Resources attached to the document
Statuses of resources Status model (registry of statuses) for resources (files) and documents
Catalog of storages Registry of available physical storages where the resources can be stored
Tags Tags Tags management and provisioning to other services

Structure

Component diagram

Component diagram of the CrowdProj

Entities

ER diagram of the CrowdProj

Contacts

Telegram groups for discussions:

Development questions: crowdproj-dev

Startup questions: crowdproj-com

opentutor's People

Contributors

sszuev avatar svok avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

opentutor's Issues

pre-built dictionaries

for new users it would be convenient to have some ready dictionaries (irregular verbs, weather)

database refactoring

  • db-mem: for internal file storage use json files instead of lingvo-xmls
  • db-pg: remove languages table: it can be replaced by local data, e.g. using java.util.Locale.getAvailableLocales()
  • db-pg: remove examples and translations tables: add corresponding columns to cards table, i.e. cards#examples (json), cards#translations (jsonb)
  • db-pg: additional cards columns: forms (jsonb), statistics (json), details (json) (+ created (datetime), updated (datetime) ?)
  • db-pg: additional dictionaries columns: settings (+ created (datetime), updated (datetime) ?)
  • db-pg: additional users columns: settings

refactoring DB and repositories

  • remove table users and DbUserRepository; keycloak will manage users, we need only user's UUID in dictionaries table
  • add :db-api; move repositories to that module
  • now repositories use :common DTO's; need to make their own DTO's

complete the learning functionality

  • finalize learning functionality (front)
  • improve business logic: move calculations from db to core (back)
  • preparing deck and learning logic should be in core, not in repositories

[blocker] keycloak authorization stopped working

it was fine, but now after successful login, calling the API results a 401 error

image

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"

How to reproduce

  1. Go to tutor-deploy and run docker-compose -f docker-compose-app.yml up flashcards-db flashcards-keycloak flashcards-app (or just docker-compose -f docker-compose-app.yml up)
  2. open http://localhost:8080 and log-in with credentials demo:demo
  3. in browser open dev-tools (F12), see error
    or
    get token:
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"}'

Additional details

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:

image

download & upload json data

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

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.