Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: monorepo #72

Merged
merged 15 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('eslint').Linter.Config} */
const config = {
ignorePatterns: ['apps/**', 'packages/**'],
extends: ['formbase/base'],
};

module.exports = config;
10 changes: 0 additions & 10 deletions .eslintrc.js

This file was deleted.

14 changes: 10 additions & 4 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9.0.4
version: 9.0.6
run_install: false
- uses: actions/setup-node@v3
with:
Expand All @@ -24,7 +24,7 @@ jobs:
run: pnpm install

- name: Type check and lint
run: pnpm --filter @formbase/web run typecheck && pnpm --filter @formbase/web run lint
run: pnpm typecheck && pnpm lint
env:
# use dummy env variables to bypass t3-env check
DATABASE_URL: postgresql://test:xxxx@xxxxxxxxx:3306/test
Expand All @@ -34,8 +34,14 @@ jobs:
SMTP_PASSWORD: password
NEXT_PUBLIC_APP_URL: http://localhost:3000
ALLOW_SIGNIN_SIGNUP: true
GITHUB_CLIENT_ID: client_id
GITHUB_CLIENT_SECRET: client_secret
AUTH_GITHUB_ID: client_id
AUTH_GITHUB_SECRET: client_secret
STRIPE_API_KEY: stripe_api_key
STRIPE_WEBHOOK_SECRET: stripe_webhook_secret
STRIPE_PRO_MONTHLY_PLAN_ID: stripe_pro_monthly_plan_id
MINIO_ENDPOINT: minio_endpoint
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
MINIO_BUCKET: minio_bucket
MINIO_PORT: 9000
MINIO_USESSL: false
164 changes: 139 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,156 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Dependencies
node_modules
.pnp
.pnp.js
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Local env files
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env.local

# Testing
coverage

# Turbo
.turbo
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Vercel
.vercel
# Next.js build output
.next
next-env.d.ts
out

# Build Outputs
.next/
out/
build
# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# Misc
# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Astro
.astro

# Tsup
.tsup

# DS_Store files
.DS_Store
*.pem
supabase

# Turborepo
.turbo

# NX
.nx

# Playwright
test-results/
playwright-report/
blob-report/
playwright/.cache/
supabase
.DS_Store
node_modules
.turbo
Expand All @@ -51,3 +164,4 @@ dist-ssr
server/dist
public/dist
.ideas
formbase-new
10 changes: 0 additions & 10 deletions .vscode/launch.json

This file was deleted.

8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@ Formbase is an open-source form backend for handling forms, notifications, secur

## Tech Stack

- [Next.js](https://nextjs.org/) – framework
- [TypeScript](https://www.typescriptlang.org/) – language
- [Tailwind](https://tailwindcss.com/) – CSS
- [PostgresSQL](https://postgresql.org/) – database
- [Lucia Auth](https://lucia-auth.com/) – auth
- [Next.js](https://nextjs.org/) – Franework
- [TypeScript](https://www.typescriptlang.org/) – Language
- [Tailwind](https://tailwindcss.com/) – Styling
- [PostgresSQL](https://postgresql.org/) – Database
- [Lucia Auth](https://lucia-auth.com/) – Authentication
- [Turborepo](https://turbo.build) - Monorepo

## Contributing

Here's how you can contribute:

- [Open an issue](https://github.com/eight-labs/formbase/issues) if you believe you've encountered a bug.
- Make a [pull request](https://github.com/eight-labs/formbase/pull) to add new features/make quality-of-life improvements/fix bugs.

## Repo Activity

![formabase.dev repo activity – generated by Axiom](https://repobeats.axiom.co/api/embed/007fbbe6f439184bf7a20b76f7f9dff7e5139330.svg "Repobeats analytics image")
12 changes: 6 additions & 6 deletions apps/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx'
})
module.exports = withNextra()
themeConfig: './theme.config.jsx',
});

module.exports = withNextra();

// If you have other Next.js configurations, you can pass them as the parameter:
// module.exports = withNextra({ /* other next.js config */ })
// module.exports = withNextra({ /* other next.js config */ })
12 changes: 6 additions & 6 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@formbase/docs",
"version": "0.0.1",
"version": "0.1.0",
"description": "Documentation for formbase.dev",
"scripts": {
"build": "next build",
"dev": "next dev -p 3001",
"start": "next start"
},
"dependencies": {
"next": "^14.2.3",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
}
}
6 changes: 3 additions & 3 deletions apps/docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ To submit the form data using an `onsubmit` handler, follow these steps:

```html
<script>
document.getElementById("formbase-form").onsubmit = async function (event) {
document.getElementById('formbase-form').onsubmit = async function (event) {
event.preventDefault();
const formData = new FormData(event.target);
const response = await fetch("https://formbase.dev/s/YOUR_FORM_ID", {
method: "POST",
const response = await fetch('https://formbase.dev/s/YOUR_FORM_ID', {
method: 'POST',
body: formData,
});
const data = await response.json();
Expand Down
Loading
Loading