Giter Club home page Giter Club logo

codelitdev / courselit Goto Github PK

View Code? Open in Web Editor NEW
554.0 5.0 120.0 895.14 MB

Create/Sell courses and digital downloads and publish blogs on your own branded website. An open source alternative to Teachable, Thinkific, Podia and the likes.

Home Page: https://courselit.app

License: GNU Affero General Public License v3.0

JavaScript 0.76% Dockerfile 0.32% Shell 0.28% TypeScript 95.11% CSS 1.40% Astro 2.12%
course blog self-hosted courses cms cms-framework teachable thinkific ghost lms

courselit's People

Contributors

dependabot[bot] avatar lgtm-com[bot] avatar rajat1saxena avatar ravirajput10 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

courselit's Issues

.env needs TAG

The docs for running on local doesn't have TAG for the .env file

The following error is produces

ERROR: Missing mandatory value for "image" option interpolating recurze/courselit-backend:${TAG?'TAG environment variable is not defined'} in service "backend": 'TAG environment variable is not defined'

The file should be something like:

SITE_URL=http://localhost
MEDIA_FOLDER=~/courselit
MONGO_ROOT_USERNAME=username
MONGO_ROOT_PASSWORD=password
DB_CONNECTION_STRING=mongodb://username:password@db
JWT_SECRET=yoursecret
JWT_EXPIRES_IN=2d
TAG=latest

Backend cannot process video thumbnails.

It seems like WEBP codec is not enabled in the FFMPEG installation inside the backend container image.

Log:

~ # ffmpeg -i "/data/uploads/hi/1/4ac6e415-0de1-42d4-81b6-96bf8fed7f5f/main.mp4"
 \
> -vf "thumbnail,scale=100:100" \
> -vframes 1 \
> -nostdin -y \
> -qscale 20 \
> "/data/uploads/hi/1/4ac6e415-0de1-42d4-81b6-96bf8fed7f5f/thumb.webp"
ffmpeg version 4.0.6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8.3.0 (Alpine 8.3.0)
  configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping --disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --disable-debug
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/uploads/hi/1/4ac6e415-0de1-42d4-81b6-96bf8fed7f5f/main.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2017-08-02T15:57:01.000000Z
  Duration: 00:00:15.95, start: 0.000000, bitrate: 41329 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 41321 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2017-08-02T15:57:01.000000Z
      handler_name    : Alias Data Handler
      encoder         : AVC Coding
Please use -q:a or -q:v, -qscale is ambiguous
Automatic encoder selection failed for output stream #0:0. Default encoder for format webp (codec webp) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:0

This flag needs to be enabled in FFMPEG configuration --enable-libwebp.

This problem does not arise on the local VS Code development container as the FFMPEG installation already has --enable-libwebp in the configuration.

Copy pasting random stuff from the internet into the TextEditor crashes it.

This text, for example, will crash the app when you try to save the content:

If your goal is to become an expert in Natural Language Processing (NLP), this program is ideal for you. Over the course of this program, you’ll become an expert in the main components of NLP, including speech recognition, sentiment analysis, and machine translation. You’ll learn cutting edge probabilistic and deep learning models, code them and train them on real data, and build a career-ready portfolio as an NLP expert!

Login Redirect Feature Is Broken

The following link will not work with magiclinks

http://localhost:3000/login?redirect=/course/12/this-is-so-good

The user will not be taken to the course we was trying to enroll in after logging in. This may hinder sales.

Backend tries to connect to db host that doesn't exist

When trying to run local, the backend image tries to connect to 172.22.0.2:27017

docker-compose -f ./docker/docker-compose.yml up
WARNING: The API_PREFIX variable is not set. Defaulting to a blank string.
Starting db ... done
Recreating backend ... done
Recreating frontend ... done
Recreating proxy    ... done
Attaching to db, backend, frontend, proxy
db          | 2020-07-19T21:05:20.820+0000 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
proxy       | [WARNING] 200/210522 (7) : Server next/next01 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
frontend    | 
frontend    | > @courselit/[email protected] start /usr/src/app
frontend    | > next start -p 3000
frontend    | 
db          | 2020-07-19T21:05:20.822+0000 W  ASIO     [main] No TransportLayer configured during NetworkInterface startup
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=12609ac4116a
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] db version v4.2.8
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] git version: 43d25964249164d76d5e04dd6cf38f6111e21f5f
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] allocator: tcmalloc
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] modules: none
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] build environment:
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten]     distmod: ubuntu1804
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten]     distarch: x86_64
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten]     target_arch: x86_64
db          | 2020-07-19T21:05:20.823+0000 I  CONTROL  [initandlisten] options: { net: { bindIp: "*" }, security: { authorization: "enabled" }, systemLog: { quiet: true } }
proxy       | [ALERT] 200/210522 (7) : backend 'next' has no server available!
db          | 2020-07-19T21:05:20.831+0000 I  STORAGE  [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
db          | 2020-07-19T21:05:20.835+0000 I  STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=483M,cache_overflow=(file_max=0M),session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
frontend    | ready - started server on http://localhost:3000
backend     | CourseLit server is running on port 8000
proxy       | [WARNING] 200/210526 (7) : Server next/next01 is UP, reason: Layer4 check passed, check duration: 0ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
backend     | Unable to establish a connection to the database.
backend     | Additional info: connect ECONNREFUSED 172.22.0.2:27017
backend exited with code 1
db          | 2020-07-19T21:05:28.356+0000 I  STORAGE  [initandlisten] WiredTiger message [1595192728:356860][1:0x7f2ca4a6fb00], txn-recover: Recovering log 2 through 3
db          | 2020-07-19T21:05:28.643+0000 I  STORAGE  [initandlisten] WiredTiger message [1595192728:643477][1:0x7f2ca4a6fb00], txn-recover: Recovering log 3 through 3
db          | 2020-07-19T21:05:28.912+0000 I  STORAGE  [initandlisten] WiredTiger message [1595192728:912047][1:0x7f2ca4a6fb00], txn-recover: Main recovery loop: starting at 2/4864 to 3/256
db          | 2020-07-19T21:05:29.272+0000 I  STORAGE  [initandlisten] WiredTiger message [1595192729:272040][1:0x7f2ca4a6fb00], txn-recover: Recovering log 2 through 3
db          | 2020-07-19T21:05:29.595+0000 I  STORAGE  [initandlisten] WiredTiger message [1595192729:595664][1:0x7f2ca4a6fb00], txn-recover: Recovering log 3 through 3
db          | 2020-07-19T21:05:29.640+0000 I  STORAGE  [initandlisten] WiredTiger message [1595192729:640282][1:0x7f2ca4a6fb00], txn-recover: Set global recovery timestamp: (0, 0)
db          | 2020-07-19T21:05:29.664+0000 I  RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
db          | 2020-07-19T21:05:29.680+0000 I  STORAGE  [initandlisten] Timestamp monitor starting
db          | 2020-07-19T21:05:29.694+0000 I  SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
db          | 2020-07-19T21:05:29.704+0000 I  STORAGE  [initandlisten] Flow Control is enabled on this deployment.
db          | 2020-07-19T21:05:29.704+0000 I  SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
db          | 2020-07-19T21:05:29.705+0000 I  SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
db          | 2020-07-19T21:05:29.715+0000 I  SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
db          | 2020-07-19T21:05:29.717+0000 I  FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
db          | 2020-07-19T21:05:29.721+0000 I  SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
db          | 2020-07-19T21:05:29.722+0000 I  NETWORK  [listener] Listening on /tmp/mongodb-27017.sock
db          | 2020-07-19T21:05:29.722+0000 I  NETWORK  [listener] Listening on 0.0.0.0
db          | 2020-07-19T21:05:29.722+0000 I  NETWORK  [listener] waiting for connections on port 27017
db          | 2020-07-19T21:05:29.722+0000 I  SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
db          | 2020-07-19T21:05:30.006+0000 I  SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>
proxy       | [WARNING] 200/210540 (7) : Server api/api01 is DOWN, reason: Layer4 timeout, check duration: 2002ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
proxy       | [ALERT] 200/210540 (7) : backend 'api' has no server available!

Regression: Lessons

  1. Lessons are not getting deleted.
  2. Media selector automatically selects the uploaded media for File type.

Tags don't work

Thanks for stopping by and exploring the issues. So you might have seen those tags on the blog posts in other blogs, rights? Tags here behave the same way.

See a live example here: https://codelit.dev/blog/understanding-cjs-ems-and-umd/vXFTUNDZMVT-0nVrTDWWe
(Scroll to the bottom of the page to notice two tags i.e. javascript and node)

The issue is, when you click on these tags, you get an error. The expected outcome is to see a grid of all items tagged with that particular tag.

On the platform you can create courses and blogs so either of those can be tagged but due to the time crunch I could not work on this and have removed the tagging functionality from the admin side so the creators can no longer add tags to their content. In the long run, I would love to support this feature.

So the scope of work here is as follows.

Let an admin add tags to products and blogs.
The tags should be visible on the blogs and the products (The introduction page).
If a user clicks on a tag, he should see a list of all items (including blogs and products) tagged with that tag.

Updating subtitle does not work after initial set up

In the console, it shows an error

Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'P.logopath.mediaId')
dispatchException — main-5d82a6288c2e328c.js:1:92813
(anonymous function) — main-5d82a6288c2e328c.js:1:89041
A — 8680.00c5fa9d10a9f68d.js:1:1133
o — 8680.00c5fa9d10a9f68d.js:1:1337
(anonymous function) — 8680.00c5fa9d10a9f68d.js:1:1396
Promise
(anonymous function) — 8680.00c5fa9d10a9f68d.js:1:1287
$e — framework-523bc72b93065597.js:1:16267
Ye — framework-523bc72b93065597.js:1:16421
(anonymous function) — framework-523bc72b93065597.js:1:34646
Nr — framework-523bc72b93065597.js:1:34735
Tr — framework-523bc72b93065597.js:1:35152
(anonymous function) — framework-523bc72b93065597.js:1:40793
Ie — framework-523bc72b93065597.js:1:116469
(anonymous function) — framework-523bc72b93065597.js:1:36613
Fr — framework-523bc72b93065597.js:1:36641
Jt — framework-523bc72b93065597.js:1:24696
Zt — framework-523bc72b93065597.js:1:23922
Zt
(anonymous function) — framework-523bc72b93065597.js:1:129373
Me — framework-523bc72b93065597.js:1:116209
Xt — framework-523bc72b93065597.js:1:23714
Xt
Page reloaded at 10:53:06 PM
5dispatchException — main-5d82a6288c2e328c.js:1:92813

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.