You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+17-88
Original file line number
Diff line number
Diff line change
@@ -15,107 +15,36 @@ Coursemology is an open source gamified learning platform that enables educators
15
15
16
16
### System Requirements
17
17
18
-
1. Ruby (= 3.3.5)
19
-
2. Ruby on Rails (= 7.2.1)
20
-
3. PostgreSQL (>= 9.5)
21
-
4. ImageMagick or GraphicsMagick (For [MiniMagick](https://github.com/minimagick/minimagick) - if PDF processing doesn't work for the import of scribing questions, download Ghostscript)
22
-
5. Node.js (v18 LTS)
23
-
6. Yarn
24
-
7. Installed docker
25
-
8. Redis
26
-
27
-
Coursemology uses [Ruby on Rails](http://rubyonrails.org/). In addition, some front-end components use [React.js](https://facebook.github.io/react/). This [guide](https://gorails.com/setup/) written by the awesome people at GoRails should help you to get started on Ruby on Rails (however, be careful about the Rails version that you are going to install here. Please refer to the system requirements for the version of Rails you need to have for your system)
18
+
1.**Ruby** (= 3.3.5)
19
+
2.**Ruby on Rails** (= 7.2.2.1)
20
+
3.**PostgreSQL** (= 16) with **PGVector extension**
21
+
4.**ImageMagick** or **GraphicsMagick** (For [MiniMagick](https://github.com/minimagick/minimagick) - if PDF processing doesn't work for the import of scribing questions, download **Ghostscript**)
22
+
5.**Node.js** (v22 LTS)
23
+
6.**Yarn**
24
+
7.**Docker** (installed and running)
25
+
8.**Redis**
28
26
29
27
### Getting Started
30
28
31
-
1.We use submodules in the git repo; use this command to update submodules:
29
+
We use Git submodules. Run the following command to initialize them before proceeding:
32
30
33
31
```sh
34
32
$ git submodule update --init --recursive
35
33
```
36
34
37
-
2. Download bundler to install dependencies
38
-
39
-
```sh
40
-
$ gem install bundler:2.5.9
41
-
```
42
-
43
-
3. Install ruby dependencies
44
-
45
-
```sh
46
-
$ bundle config set --local without 'ci:production'
47
-
$ bundle install
48
-
```
49
-
50
-
4. Install javascript dependencies
51
-
52
-
```sh
53
-
$ cd client && yarn;cd -
54
-
```
55
-
56
-
5. Create and seed the database
57
-
58
-
```sh
59
-
$ bundle exec rake db:setup
60
-
```
61
-
62
-
6. We are using [Keycloak](https://www.keycloak.org/) as our Identity and Access Management (IAM) solution. Before proceeding to the next step, please navigate to `./authentication` folder, follow the instruction provided over the [README](https://github.com/Coursemology/coursemology2/blob/master/authentication/README.md), and then ensure that the Docker for Coursemology Authentication is running and that you are able to access the Keycloak site as mentioned in the very last step of that instruction
63
-
64
-
7. Initialize .env files for Frontend and Backend
65
-
66
-
```sh
67
-
$ cp env .env; cp client/env client/.env
68
-
```
69
-
70
-
You may need to add specific API keys (such as the [GOOGLE_RECAPTCHA_SITE_KEY](https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do)) to the .env files for testing specific features.
71
-
72
-
8. Open up 3 different terminals. On the terminal for Frontend in the `client` directory, run
73
-
74
-
```
75
-
yarn build:development
76
-
```
77
-
78
-
on the terminal for authentication service in the `authentication` directory, if you have not yet started Keycloak, run
79
-
80
-
```
81
-
docker compose up
82
-
```
83
-
84
-
or
85
-
86
-
```
87
-
docker-compose up
88
-
```
89
-
90
-
and on the terminal for Backend, run
91
-
92
-
```
93
-
bundle exec rails s -p 3000
94
-
```
95
-
96
-
9. Access the App by visiting `http://localhost:8080`
97
-
98
-
10. You're all set! Simply login with the default username and password:
2.[Ruby on Rails application server](./app/README.md)
38
+
3.[React frontend client](./client/README.md)
107
39
108
-
To make sure that multi tenancy works correctly for you, change the default host in `config/application.rb` before deploying:
40
+
Set up and run each component sequentially by following the linked documentation pages. As you proceed, open a new terminal window for each component after the previous component has been fully set up and started running.
109
41
110
-
```ruby
111
-
config.x.default_host ='your_domain.com'
112
-
```
42
+
Once each component has been set up and is running on their own terminals, you can access the app by visiting [http://localhost:8080](http://localhost:8080), and log in using the default user email and password:
Email reminders for items which are about to start are sent via a cronjob which should be run once an hour. See `config/initializers/sidekiq.rb` and `config/schedule.yml` for sample configuration which assumes that the [Sidekiq](https://github.com/mperham/sidekiq) and [Sidekiq-Cron](https://github.com/ondrejbartas/sidekiq-cron) gems are used.
117
47
118
-
If you use a different job scheduler, edit those files so your favourite job scheduler invokes the `ConsolidatedItemEmailJob` job once an hour.
Coursemology uses [Ruby on Rails](http://rubyonrails.org/) as its backend app server. This [guide](https://gorails.com/setup/) written by the awesome people at GoRails should help you to get started on Ruby on Rails (however, be careful about the Rails version you are going to install here, and make sure your system meets its requirements).
4
+
5
+
## Getting Started
6
+
7
+
These commands should be run with the repository root directory (one level up from where this README file is) as the working directory.
8
+
9
+
1. Download bundler to install dependencies
10
+
11
+
```sh
12
+
gem install bundler:2.5.9
13
+
```
14
+
15
+
2. Install ruby dependencies
16
+
17
+
```sh
18
+
bundle config set --local without 'ci:production'
19
+
bundle install
20
+
```
21
+
22
+
3. Create and seed the database
23
+
24
+
```sh
25
+
bundle exec rake db:setup
26
+
```
27
+
28
+
4. Initialize .env file
29
+
30
+
```sh
31
+
cp env .env
32
+
```
33
+
34
+
You may need to add specific API keys (such as the [GOOGLE_RECAPTCHA_SITE_KEY](https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do)) to the .env files for testing specific features.
35
+
36
+
5. To start the app server, run
37
+
38
+
```
39
+
bundle exec rails s -p 3000
40
+
```
41
+
42
+
## Configuration
43
+
44
+
### Multi Tenancy
45
+
46
+
To make sure that multi tenancy works correctly for you, change the default host in `config/application.rb` before deploying:
47
+
48
+
```ruby
49
+
config.x.default_host ='your_domain.com'
50
+
```
51
+
52
+
### Opening Reminder Emails
53
+
54
+
Email reminders for items which are about to start are sent via a cronjob which should be run once an hour. See [config/initializers/sidekiq.rb](../config/initializers/sidekiq.rb) and [config/schedule.yml](../config/schedule.yml) for sample configuration which assumes that the [Sidekiq](https://github.com/mperham/sidekiq) and [Sidekiq-Cron](https://github.com/ondrejbartas/sidekiq-cron) gems are used.
55
+
56
+
If you use a different job scheduler, edit those files so your favourite job scheduler invokes the `ConsolidatedItemEmailJob` job once an hour.
Copy file name to clipboardexpand all lines: authentication/README.md
+21-1
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,15 @@
1
-
# Coursemology ID Authentication
1
+
# Coursemology Authentication Provider
2
2
3
3
We are now using [Keycloak](https://www.keycloak.org/) as our Identity and Access Management (IAM) solution.
4
4
5
5
## Installation Guide
6
6
7
+
### Getting Started
8
+
9
+
These commands should be run with the working directory `coursemology2/authentication` (the same directory this README file is in)
10
+
7
11
1. Make sure you have docker and also docker-compose installed.
12
+
8
13
2. Run the following command
9
14
10
15
```
@@ -39,6 +44,21 @@ We are now using [Keycloak](https://www.keycloak.org/) as our Identity and Acces
39
44
40
45
## Further Guide
41
46
47
+
The local setup requires the authentication provider container to connect to the postgres service running on the host machine. On Windows and Mac, this is already set up by Docker Desktop, which lets the container do this by accessing the `host.docker.internal` hostname. On Linux devices, this can be set up by either:
48
+
- installing [Docker Desktop for Linux](https://docs.docker.com/desktop/setup/install/linux/); **or**
49
+
- changing the `KC_NETWORK_MODE` environment variable to `host`, and adding the following to the docker-compose service declaration:
50
+
51
+
```yaml
52
+
53
+
services:
54
+
coursemology_auth:
55
+
container_name: coursemology_authentication
56
+
...
57
+
extra_hosts:
58
+
- 'host.docker.internal:127.0.0.1'
59
+
60
+
```
61
+
42
62
To ensure the smoothness in signing-in to Coursemology, you must ensure that the configuration for `KEYCLOAK_BE_CLIENT_SECRET` inside `.env` matches with the settings inside Keycloak. To do so, you can simply do the following instructions:
43
63
44
64
1. Sign-in to authentication pages by inputting the following credentials:
Copy file name to clipboardexpand all lines: client/README.md
+26
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,31 @@
1
1
# Coursemology Client
2
2
3
+
The front-end UI of Coursemology is written using [React.js](https://facebook.github.io/react/). Most of our pages and their components are written in TypeScript as [React functional components](https://react.dev/learn/your-first-component#defining-a-component), though there are some older parts in JS or using class components that should be migrated to functional components in the future.
4
+
5
+
## Getting Started
6
+
7
+
These commands should be run with the working directory `coursemology2/client` (the same directory this README file is in)
8
+
9
+
1. Install javascript dependencies
10
+
11
+
```sh
12
+
yarn
13
+
```
14
+
15
+
2. Run the following command to initialize `.env` files over here
16
+
17
+
```sh
18
+
cp env .env
19
+
```
20
+
21
+
You may need to add specific API keys (such as the [GOOGLE_RECAPTCHA_SITE_KEY](https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do)) to the .env files for testing specific features.
22
+
23
+
3. To start the frontend, run
24
+
25
+
```sh
26
+
yarn build:development
27
+
```
28
+
3
29
## Translations
4
30
5
31
To generate a list of strings that need to be translated,
0 commit comments