├── .github └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── apps └── website │ ├── .env.example │ ├── .eslintrc.json │ ├── .gitignore │ ├── README.md │ ├── app │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ └── page.tsx │ ├── components.json │ ├── components │ ├── analytics.tsx │ ├── button.tsx │ ├── code-block.tsx │ ├── demo.tsx │ ├── external-link.tsx │ ├── footer.tsx │ ├── hero.tsx │ ├── onboarding-skeleton.tsx │ ├── onboarding │ │ ├── creating-steps.tsx │ │ ├── give-feedback-step.tsx │ │ ├── install-library.tsx │ │ ├── introduction-step.tsx │ │ ├── onboarding-data.tsx │ │ ├── onboarding-setup.tsx │ │ ├── onboarding-step-completion.tsx │ │ ├── onboarding-step.tsx │ │ ├── thank-you.tsx │ │ └── writing-onboarding-steps.tsx │ ├── subtitle.tsx │ └── ui │ │ ├── button.tsx │ │ ├── form.tsx │ │ ├── input.tsx │ │ ├── label.tsx │ │ ├── select.tsx │ │ └── skeleton.tsx │ ├── lib │ ├── analytics.ts │ ├── hooks.ts │ └── utils.ts │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.js │ ├── public │ ├── next.svg │ ├── onboarding-lib-logo.svg │ └── vercel.svg │ ├── tailwind.config.ts │ └── tsconfig.json ├── docs ├── onboarding-lib-banner.png └── onboarding-lib-logo.png ├── package.json ├── packages └── lib │ ├── README.md │ ├── eslint.config.js │ ├── package.json │ ├── src │ ├── hooks.ts │ ├── index.tsx │ ├── types.ts │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── prettier.config.cjs └── turbo.json /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | push: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | lint: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | - run: corepack enable 18 | - uses: actions/setup-node@v3 19 | with: 20 | node-version: 16 21 | cache: 'pnpm' 22 | 23 | - name: 📦 Install dependencies 24 | run: pnpm install --frozen-lockfile 25 | 26 | - name: 🔠 Lint project 27 | run: pnpm lint 28 | 29 | test: 30 | runs-on: ubuntu-latest 31 | 32 | steps: 33 | - uses: actions/checkout@v3 34 | - run: corepack enable 35 | - uses: actions/setup-node@v3 36 | with: 37 | node-version: 16 38 | cache: 'pnpm' 39 | 40 | - name: 📦 Install dependencies 41 | run: pnpm install --frozen-lockfile 42 | 43 | - name: 🛠 Build project 44 | run: pnpm build 45 | 46 | - name: 💪 Test types 47 | run: pnpm test:types 48 | 49 | - name: 🧪 Test project 50 | run: pnpm test -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules/ 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | dist/ 13 | 14 | # misc 15 | .DS_Store 16 | .rollup.cache 17 | *.pem 18 | 19 | # debug 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | 24 | # local env files 25 | .env*.local 26 | 27 | # typescript 28 | *.tsbuildinfo 29 | next-env.d.ts 30 | 31 | #turbo 32 | .turbo 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Neftic Oy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | packages/lib/README.md -------------------------------------------------------------------------------- /apps/website/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_POSTHOG_KEY="phc_...." 2 | NEXT_PUBLIC_POSTHOG_HOST="https://eu.posthog.com" 3 | -------------------------------------------------------------------------------- /apps/website/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /apps/website/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /apps/website/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | # or 14 | bun dev 15 | ``` 16 | 17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 18 | 19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 20 | 21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 | 23 | ## Learn More 24 | 25 | To learn more about Next.js, take a look at the following resources: 26 | 27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 29 | 30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 31 | 32 | ## Deploy on Vercel 33 | 34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 35 | 36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 37 | -------------------------------------------------------------------------------- /apps/website/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/useflytrap/onboarding_lib/83450f46d069427421bf5a1a3b2dfc7b861e03ad/apps/website/app/favicon.ico -------------------------------------------------------------------------------- /apps/website/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --gray1: #fcfcfc; 7 | --gray2: #f9f9f9; 8 | --gray3: #f0f0f0; 9 | --gray4: #e8e8e8; 10 | --gray5: #e0e0e0; 11 | --gray6: #d9d9d9; 12 | --gray7: #cecece; 13 | --gray8: #bbbbbb; 14 | --gray9: #8d8d8d; 15 | --gray10: #838383; 16 | --gray11: #646464; 17 | --gray12: #202020; 18 | } 19 | -------------------------------------------------------------------------------- /apps/website/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next" 2 | import { Inter } from "next/font/google" 3 | 4 | import "./globals.css" 5 | import { Toaster } from "sonner" 6 | 7 | import { PosthogProvider } from "@/components/analytics" 8 | import { Footer } from "@/components/footer" 9 | 10 | const inter = Inter({ subsets: ["latin"] }) 11 | 12 | export const metadata: Metadata = { 13 | title: "ONBOARDING_LIB", 14 | description: 15 | "ONBOARDING_LIB is a tiny headless onboarding library with form validation, schema validation using Zod and persistance with unstorage.", 16 | } 17 | 18 | export default function RootLayout({ 19 | children, 20 | }: Readonly<{ 21 | children: React.ReactNode 22 | }>) { 23 | return ( 24 | 25 | 26 | 27 | {children} 28 |