Skip to content

Tambouil/elearnco

 
 

Repository files navigation

og:image

Summary

Elearnco is an open source platform for creating learning paths by simply dragging and dropping. This is in development and it is not recommended to use it in production at this time. ⚠ WORK IN PROGRESS ⚠

  • Node.js 20.x
  • yarn
  • Docker and docker-compose (recommended)

A global installation of turbo is recommended.

# Install turbo globally
$ yarn global add turbo
# Clone the repository
$ git clone git@github.com:code-dev-pro/elearnco.git && cd elearnco

# Install Node dependencies
$ yarn install

⚠ For performance reasons, this project uses Yarn. Do not use npm install. You should never have a package-lock.json.

Storybook

You can use the storybook for adding or creating UI/UX components and add them to Elearnco. story_1

React Email

You can preview your emails. Capture d’écran 2023-11-23 à 14.59.33

Check version packages to update

Run the following command:

yarn outdated

Update version package

Run the following command:

yarn upgrade 

Structure

This project under turborepo includes the following packages/apps:

Apps and Packages

  • web: a Next.js app
  • config: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • database: Prisma ORM wrapper to manage & access your database
  • tsconfig: tsconfig.jsons used throughout the monorepo

Each package/app is 100% TypeScript.

Utilities

This turborepo has some additional tools already setup for you:

We use Prisma to manage & access our database. As such you will need a database for this project, either locally or hosted in the cloud.

To make this process easier, we offer a docker-compose.yml file to deploy a postgres server locally with a new database named edukeasy (To change this update the POSTGRES_DB environment variable in the docker-compose.yml file):

docker-compose up -d

Once deployed you will need to copy the .env.example file to .env in order for Prisma to have a DATABASE_URL environment variable to access.

cp .env.example .env

If you added a custom database name, or use a cloud based database, you will need to update the DATABASE_URL in your .env accordingly.

Once deployed & up & running, you will need to create & deploy migrations to your database to add the necessary tables. This can be done using Prisma Migrate:

npx prisma migrate dev

If you need to push any existing migrations to the database, you can use either the Prisma db push or the Prisma migrate deploy command(s):

yarn run db:push

# OR

yarn run db:migrate:deploy

There is slight difference between the two commands & Prisma offers a breakdown on which command is best to use.

An optional additional step is to seed some initial or fake data to your database using Prisma's seeding functionality.

To do this update check the seed script located in packages/database/src/seed.ts & add or update any users you wish to seed to the database.

Once edited run the following command to run tell Prisma to run the seed script defined in the Prisma configuration:

yarn run db:seed

you can quickly have a look at the data of your local database and check if your app is working correctly with Prisma Studio

npx prisma studio

Data

For further more information on migrations, seeding & more, we recommend reading through the Prisma Documentation.

To build all apps and packages, run the following command:

yarn run build

To develop all apps and packages, run the following command:

yarn run dev

Each commit message must follow the convention Conventional Commits v1.0.0.

The command message should be structured as follows:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

To make it easier, an interface will appear when commiting to create structured commit messages.

You can find the hook for running commitizen in .husky/prepare-commit-msg

Useful Links

Learn more about the power of Turborepo:

The source code for various apps and packages in this repository are currently licensed under BSD 3-Clause. These licenses are subject to change.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.7%
  • SCSS 3.0%
  • JavaScript 1.4%
  • CSS 0.6%
  • MDX 0.3%
  • HTML 0.0%