Git Product home page Git Product logo

cal-starter's Introduction

Logo

Cal.com Platform Starter Kit

Build your pixel-perfect booking experience

Demo · Docs · Deploy on Vercel

Discord · Website · Issues

Platform Starter Kit Example

Cal.com Platform Starter Kit showcases the new Cal.com Platform API and Cal.com Atoms. It was built using the T3 Stack with Supabase as the Postgres Database host.

Deploy your own

Deploy with Vercel

How to use

1. Clone the repository

HTTPS:

git clone https://github.com/calcom/platform-starter-kit.git

GitHub CLI:

gh repo clone calcom/platform-starter-kit

2. Move into the Starter

cd platform-starter-kit/

3. Install dependencies

Important

Package Manager: This repository is deployed as-is and therefore contains a pnpm-lock.yaml file. As a result, you currently have to use pnpm as your package manager to ensure that the dependencies are installed correctly.

pnpm install

4. Set Environment Variables

We provide most environment variables out of the box (including Cal-related variables).

So get started by copying the .env.example:

cp .env.example .env

4.1 Database

This project uses Postgres with Supabase. You can create a free project at database.new.

Then, get the Database URL from the Supabase dashboard and update the respective values in your .env file:

POSTGRES_PRISMA_URL="postgres://postgres.YOUR-PROJECT-REF:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres" # Transaction Mode
POSTGRES_URL_NON_POOLING="postgres://postgres.YOUR-PROJECT-REF:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres"  # Session Mode

When working locally you can use the DB URL: postgresql://postgres:[email protected]:54322/postgres outputted by the supabase start command for both vairables.

[Only needed when deploying manually] Initialize the database:

Note that if you used the Vercel Deploy link from above, the Supabase Vercel integration sets this up automatically for you!

pnpm db:init
pnpm db:seed # Will throw an error if DB is already seeded, which you can ignore.

4.2 Authentication

Generate a NextAuth secret and add it to your .env file:

openssl rand -hex 32
# Next Auth
# You can generate a new secret on the command line with
# openssl rand -base64 32
# <https://next-auth.js.org/configuration/options#secret>

AUTH_SECRET="SQhGk****"

4.3 Cal

For development, you're all set! We've provided you with our sandbox keys that you can find the .env.example file.

For production, keep in mind that you'll have to update the NEXT_PUBLIC_REFRESH_URL variable to make it point to your deployment, e.g.:

# 3/ *REFRESH URL.* You have to expose an endpoint that will be used from calcom: https://cal.com/docs/platform/quick-start#4.-backend:-setting-up-refresh-token-endpoint

NEXT_PUBLIC_REFRESH_URL="https://<your-project>.vercel.app/api/cal/refresh"

5. Development Server From here, you're all set. Just start the development server & get going.

pnpm dev

What's next? How do I make an app with this?

We try to keep this project as simple as possible, so you can start with Cal.com Platform and the scaffolding we set up for you, and add additional things later when they become necessary.

If you are not familiar with the different technologies used in this project, please refer to the respective docs.

Learn More about Cal.com Platform

Visit our documentation at cal.com/docs/platform or join our Discord.

Contact sales to purchase a commercial API key here: cal.com/sales.

Learn More about T3

To learn more about the T3 Stack, take a look at the following resources:

You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!

Learn More about Supabase

Supabase is the fastest way to get up and running with Next.js and Postgres. Check out this video to learn more!

cal-starter's People

Contributors

p6l-richard avatar peerrich avatar helgastogova avatar thorwebdev avatar lit2l avatar

Watchers

 avatar

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.