Skip to content

DeepanshuMishraa/courseSync

Repository files navigation

Logo

CourseSync

The open-source Resource Manager For Students.
Learn more »

· Website · Issues

About the Project

dashboard

A Resource & Study Material Manager for Students

CourseSync: Organize, Share, Learn. A collaborative platform for students to manage and exchange study materials seamlessly.

Built With

Contact us

Getting Started

To get a local copy up and running, please follow these simple steps.

Prerequisites

Here is what you need to be able to run Cal.com.

  • Node.js (Version: >=18.x)
  • PostgreSQL (Version: >=13.x)
  • NPM (Version: >=7.x)

If you want to enable any of the available integrations, you may want to obtain additional credentials for each one. More details on this can be found below under the integrations section.

Development

Setup

  1. Clone the repo into a public GitHub repository (or fork https://github.com/DeepanshuMishraa/courseSync)

    git clone https://github.com/DeepanshuMishraa/courseSync

    If you are on Windows, run the following command on gitbash with admin privileges:
    > git clone -c core.symlinks=true https://github.com/DeepanshuMishraa/courseSync
    > This will ensure that symlinks are created correctly.

  2. Go to the project folder

    cd courseSync
  3. Install packages with npm

    npm install
  4. Set up your .env file

    • Duplicate .env.example to .env
    • Use openssl rand -base64 32 to generate a key and add it under NEXTAUTH_SECRET in the .env file.

Manual setup

  1. Configure environment variables in the .env file. Replace <user>, <pass>, <db-host>, and <db-port> with their applicable values

    DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>'
    
    If you don't know how to configure the DATABASE_URL, then follow the steps here to create a quick local DB
    1. Download and install postgres in your local (if you don't have it already) or you can visit(https://neon.tech) to get a postgres db for an free instance

    2. Create your own local db by executing createDB <DB name>

    3. Now open your psql shell with the DB you created: psql -h localhost -U postgres -d <DB name>

    4. Inside the psql shell execute \conninfo. And you will get the following info.
      image

    5. Now extract all the info and add it to your DATABASE_URL. The url would look something like this postgresql://postgres:postgres@localhost:5432/Your-DB-Name. The port is configurable and does not have to be 5432.

    If you don't want to create a local DB. Then you can also consider using services like railway.app or render.

  2. Copy and paste your DATABASE_URL to .env.

  3. Set up the database using the Prisma schema (found in packages/prisma/schema.prisma)

    In a development environment, run:

    npx prisma migrate

    In a production environment, run:

    npx prisma deploy
  4. Run (in development mode)

    npm run dev

Setting up your first user

Approach 1
  1. Open Prisma Studio to look at or modify the database content:

    yarn db-studio
  2. Click on the User model to add a new user record.

  3. Fill out the fields email, username, password, and set metadata to empty {} (remembering to encrypt your password with BCrypt) and click Save 1 Record to create your first user.

    New users are set on a TRIAL plan by default. You might want to adjust this behavior to your needs in the packages/prisma/schema.prisma file.

  4. Open a browser to http://localhost:3000 and login with your just created, first user.

Upgrading from earlier versions

  1. Pull the current version:

    git pull
  2. Check if dependencies got added/updated/removed

    npm install
  3. Apply database migrations by running one of the following commands:

    In a development environment, run:

    npx prisma migrate

    (This can clear your development database in some cases)

    In a production environment, run:

    npx prisma deploy
  4. Check for .env variables changes

    npm predev
  5. Start the server. In a development environment, just do:

    npm run dev

    For a production build, run for example:

    npm build
    npm start
  6. Enjoy the new version.

Deployment

Vercel

you can use vercel to deploy this application. make sure to add the environment variables in the vercel dashboard.

Deploy with Vercel

Acknowledgements

Special thanks to these amazing projects which help power CourseSync:

About

CourseSync: Organize, Share, Learn. A collaborative platform for students to manage and exchange study materials seamlessly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages