Building The Big O Community Ep - 2

Building The Big O Community Ep - 2

Table of Contents

The Big O Community

‘O’ means Open.

i’ve came across 2 providers which can be good base for The Big O Community.

  1. Saasfly

Let’s see what Saasify is and how can i make site for the community:

Important thing to notice, Saasify is not NodeJS based but Bun based.

Development Docs:

Site: https://docs.saasfly.io/get-started/installation/

atulraj@bazzite:~/Desktop/Projects/TS/LearningBun$ bun create saasfly

░██████╗░█████╗░░█████╗░░██████╗███████╗██╗░░░░░██╗░░░██╗
██╔════╝██╔══██╗██╔══██╗██╔════╝██╔════╝██║░░░░░╚██╗░██╔╝
╚█████╗░███████║███████║╚█████╗░█████╗░░██║░░░░░░╚████╔╝░
░╚═══██╗██╔══██║██╔══██║░╚═══██╗██╔══╝░░██║░░░░░░░╚██╔╝░░
██████╔╝██║░░██║██║░░██║██████╔╝██║░░░░░███████╗░░░██║░░░
╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚═╝░░░░░╚══════╝░░░╚═╝░░░

"Build SAAS service with Ease"
Next.js + TypeScript + tRPC + Bun
Now with Bun! 🐼

Enter the name of the project:
> the-big-o-community
 

👉 Setting up a new saasfly project.
This script follows the steps below to create your project:
1. Clone the saasfly repository into the specified folder.
2. Remove git history
3. Install dependencies
4. Generate prisma type
✔ Cloning saasfly into the-big-o-community

✅ Repository cloned successfully.

Removed: the-big-o-community/.git
All paths removed successfully!

✅ Git history removed.

✔ Installing dependencies
✅ Dependencies installed.

✔ Generating Prisma Type
✅ Prisma type generated.


💭 Remember to set up your environment variables properly:
1. Duplicate the .env.example file, rename it to .env.local, and enter your variables.
2. 


🚀 Successfully created saasfly project!
Make sure you have a postgre db and have created a new project.
After filling out your .env file, run ' bun db:push' to create your database tables.
To start the Stripe and web development servers, run 'bun dev' in separate terminal tabs.
(if you don't need Stripe, run 'bun dev:web' )

Environment variables:

cp .env.example .env.local
  1. Setup Auth Secret:
openssl rand -base64 32

Get the hash value and add it to NEXTAUTH_SECRET in .env.local

  1. Github Auth for now: https://github.com/settings/developers

    • Create OAuth App and get the:
      1. Client Id
      2. Secret
  2. Resend: Email

    • For this you do need to be the owner of a domain name
    • Get the
      • API key
      • From email address for sender mail
  3. In docs there is mentions about database too

    • Get a postgres db
      • i am using neon

Starting the project:

  1. Database;
bun db:push

This will push the db schema to your pg db

  1. First build
bun run build

As this is Turborepo

the build is quite fast.

you can diable the telemetry:

bunx turbo telemetry disable
  1. Running the project:
bun run dev:web

Project structure

https://docs.saasfly.io/get-started/project-structure/

Coloring the project my way.

i have updated the project according to TBO, now how do i deploy it?

Deployment:

  • In readme they have provided the Deploy button.
  • that button leads to vercel and it starts the project by cloning

alt text

i guess let’s see how this works.

Error on Vercel: no public:

Issue is here

Solution: Vercel: Project: Settings: Root directory: apps/nextjs

Tags :