Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ymihere03 authored Jan 17, 2025
0 parents commit 796f201
Show file tree
Hide file tree
Showing 502 changed files with 46,686 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_DEFAULT_LOCALE=en
NEXT_PUBLIC_REQUIRE_EMAIL_CONFIRMATION=true
23 changes: 23 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
NEXT_PUBLIC_SITE_URL=http://localhost:3000
ENVIRONMENT=development

# SUPABASE
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU

NEXT_PUBLIC_REQUIRE_EMAIL_CONFIRMATION=true

EMAIL_SENDER=[email protected]
EMAIL_PORT=54325
EMAIL_HOST=localhost
EMAIL_TLS=false
EMAIL_USER=user
EMAIL_PASSWORD=password

# STRIPE
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=

# FEATURE FLAGS
NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=true
NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=true
30 changes: 30 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
NEXT_PUBLIC_SITE_URL=
ENVIRONMENT=production

# SUPABASE
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
NEXT_PUBLIC_REQUIRE_EMAIL_CONFIRMATION=true

## THESE VARIABLES MUST BE ADDED USING THE CI/CD ENVIRONMENT VARIABLES
SUPABASE_SERVICE_ROLE_KEY=

# STRIPE
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=

## THESE VARIABLES MUST BE ADDED USING THE CI/CD ENVIRONMENT VARIABLES
STRIPE_WEBHOOK_SECRET=
STRIPE_SECRET_KEY=

# EMAIL
## THESE VARIABLES MUST BE ADDED USING THE CI/CD ENVIRONMENT VARIABLES
EMAIL_HOST=
EMAIL_PORT=465
EMAIL_USER=
EMAIL_PASSWORD=
EMAIL_SENDER='MakerKit Team <[email protected]>'
EMAIL_TLS=true

# FEATURE FLAGS
NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=false
NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=false
26 changes: 26 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
NEXT_PUBLIC_SITE_URL=http://localhost:3000
ENVIRONMENT=test

USER_EMAIL=[email protected]
USER_PASSWORD=testingpassword
EMAIL_PORT=54325
EMAIL_HOST=localhost
EMAIL_TLS=false
EMAIL_USER=user
EMAIL_PASSWORD=password

NEXT_PUBLIC_REQUIRE_EMAIL_CONFIRMATION=true

NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU

EMAIL_SENDER='MakerKit Team <[email protected]>'

# STRIPE
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51K9cWKI1i3VnbZTq2HGstY2S8wt3peF1MOqPXFO4LR8ln2QgS7GxL8XyKaKLvn7iFHeqAnvdDw0o48qN7rrwwcHU00jOtKhjsf
# STRIPE_SECRET_KEY=
# STRIPE_WEBHOOK_SECRET=

NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=true
NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=true
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": ["next", "prettier"],
"rules": {
"no-restricted-imports": ["error", {
"paths": [{
"name": "react-i18next",
"importNames": ["Trans"],
"message": "Please use `~/core/ui/Trans` instead of `react-i18next/Trans`."
}]
}]
}
}
131 changes: 131 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: 🚀 Build
on:
push:
branches:
- main
- dev
pull_request: {}

permissions:
actions: write
contents: read

jobs:
lint:
name: ⬣ ESLint
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: 🔬 Lint
run: npm run lint

typecheck:
name: ʦ TypeScript
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build Content
run: ./node_modules/.bin/contentlayer build

- name: 🔎 Type check
run: npm run typecheck --if-present

test:
name: ⚫️ Test
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
env:
SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
ENABLE_STRIPE_TESTING: ${{ vars.ENABLE_STRIPE_TESTING }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}

steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Cache Cypress Binary
id: cache-cypress-binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: binary-${{ hashFiles('package-lock.json') }}

- name: Supabase CLI
uses: supabase/setup-cli@v1

- name: Stop Supabase (if running)
continue-on-error: true
id: supabase-stop
run: supabase stop -- --no-backup

- name: Start Supabase
id: supabase-start
run: npm run supabase:start -- -x studio,migra,deno-relay,pgadmin-schema-diff,imgproxy,logflare

- name: Environment variables
uses: aarcangeli/[email protected]
with:
filenames: |
.env.test
quiet: true
if-file-not-found: error

- name: Test DB
if: steps.supabase-start.outputs.exit_code == 0
run: npm run test:reset:db

- name: 🔎 Cypress
if: steps.supabase-start.outputs.exit_code == 0
run: npm run test:e2e build

- name: Archive test screenshots
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: screenshots
path: ./cypress/screenshots/
retention-days: 2

- name: Stop Docker (if running)
continue-on-error: true
if: always()
id: docker-stop
run: docker kill $(docker ps -q)
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.idea
.vscode

cypress/screenshots

.contentlayer

public/robots.txt
public/sitemap.xml
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
legacy-peer-deps=true
shamefully-hoist=true
Loading

0 comments on commit 796f201

Please sign in to comment.