Skip to content

yaryna-bashchak/platform-for-courses

Repository files navigation

Platform for creating and taking Courses

Technologies

  • .NET for the Back-end
  • React for the Front-end
  • Redux for storing data from database on Front-end
  • Cloudinary server for storing videos and images
  • Stripe service for receiving payments

About project

This is a Platform for creating and taking the courses. Here is a web API that helps you interact with a database that stores courses data, and the client side to create and take courses (log in, create and complete lessons, upload and watch videos, take tests).

To run the project locally see "How to run".

How to run

  • first of all, you need to install .Net 8.0 (if you do not already have it)
  • open this folder in VS Code

Now you're ready to start. If you want to run the app:

  • run Docker Desktop and the following command to create postgres database

$ docker run --name devCourse -e POSTGRES_USER=appuser -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:latest

  • go to API folder, set 6 user-secrets: 3 for Cloudinary (that stores videos) and 3 for Stripe (is used for payments):

$ cd API
$ dotnet user-secrets set "<KeyName>" "<Value>"

image
  • run the API:

$ dotnet restore
$ dotnet run

  • run client side using the following commands:

$ cd client
$ npm install
$ npm start

  • to receive webhook information from Stripe when payment is successful and grant the user access to the course, run the following command:

$ stripe listen -f http://localhost:5000/api/payments/webhook -e charge.succeeded

How to use

1) Create your personal account

image

Then you should see this message about successful registretion.

image

2) Create a Course

Managing courses is allowed only to users with "Teacher" role. They have "Редагувати курси" tab on the top bar.

Here you can create a new course or edit existing. Only active courses are visible for users.

image image

You can change any information, create new sections, lessons and so on.

image image image

Also create and edit tests.

image image

Share link to your course with others.

image

3) Take a Course

- Buy a Course.

Go to the main page and buy any course.

image

Choose your plan.

image

Review purchase.

image

Enter card data. Use the following test card data:

card number: 4242 4242 4242 4242

expiry date: any future date

CVV: any 3 digits

image

You should see the success message.

image image

- Complete some lessons.

Go the course.

image

Choose the lesson and start learning.

image

The lesson consists of videos and tests that should be completed after the lesson.

image

Complete the videos. Pass the tests.

image

image

After answering, you immediately see whether you are right or not.

image

image

At the end, you will see your score.

image

image

- Check your progress

Also you can see what stage each lesson is at (completed, in progress, not started) and how many completed lessons are in each section.

image

Mobile Design

The app is also adapted to smaller devices such as a phone or tablet. For example, for smaller screens, a side menu appears in the header, which repeats the same buttons that are on the large screens. The content of the pages is also appropriate.

Web API

If you want to test how the Web API works it would be enough to run only API folder (see "How to run").

Example of getting lesson by id, where you can see information about the lesson, as well as a list of keywords and lessons that are recommended to be completed/repeated before.

Tests

If you want to run tests (you also can see that all tests are passed in Github Actions)

  • go back to the root folder maths-course if you are not there
  • run the following command

$ dotnet test ./API.Tests

Example:

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages