Skip to content

Commit

Permalink
refactor(core): Use folder src and structure new folders, remove libs…
Browse files Browse the repository at this point in the history
… and Bump [email protected]
  • Loading branch information
wootsbot committed Aug 21, 2024
1 parent 347421c commit f5a7389
Show file tree
Hide file tree
Showing 120 changed files with 8,696 additions and 6,402 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-zoos-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'x-boilerplate': major
---

Use folder src and structure new folders, remove libs and Bump [email protected]
19 changes: 9 additions & 10 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
NEXT_PUBLIC_MSW_MOCKING = 'disabled'

GITHUB_ID=""
GITHUB_SECRET=""
NEXTAUTH_URL="http://localhost:3000/"
SECRET=""

RESEND_API_KEY=""
RESEND_DOMAIN="[email protected]"

NEXT_PUBLIC_API_URL_BASE=""
TWITTER_CREATOR="@wootsbot"
SITE_NAME="X Boilerplate"
SITE_URL="https://x.openkit.run"
NEXT_PUBLIC_SITE_URL="https://x.openkit.run"

RESEND_API_KEY=""
RESEND_DOMAIN="[email protected]"

AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""

AUTH_SECRET="" # Added by `npx auth`. Read more: https://cli.authjs.dev

# Optional
NEXT_PUBLIC_DEFAULT_LANGUAGE_KEY="en"
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## Core Features

- ⚡️ [React 18](https://reactjs.org/), [Next 13](https://nextjs.org/), [pnpm](https://pnpm.io/) - born with fastness
- ⚡️ [React 18](https://reactjs.org/), [Next 14](https://nextjs.org/), [pnpm](https://pnpm.io/) - born with fastness

- 🗂 [Structure with paths and alias](./tsconfig.json)

Expand All @@ -35,17 +35,17 @@

## Optional Features

- 🍍 [State Management x-state](https://xstate.js.org/) or [State Management TanStack Query](https://tanstack.com/query/v4)
- 🍍 [Asynchronous state management - TanStack Query](https://tanstack.com/query) and [State Management zustand](https://zustand-demo.pmnd.rs/)

- 🔥 Mocking via [msw](https://mswjs.io/)
- 🔥 Mocking via [msw](https://mswjs.io/) [WIP]

- 🛡️ Authentication for Next.js [NextAuth](https://next-auth.js.org/)

- ✉️ Send emails with [Resend](https://resend.com) and [@react-email](https://react.email/docs/integrations/resend)

- 🐂 Internationalization with [react-i18next](https://react.i18next.com/) (SSG)

- 💩 Tests with [vitest](https://vitest.dev/) and [playwright](https://playwright.dev/)
- 💩 Tests unit with [vitest](https://vitest.dev/) and Tests e2e with [playwright](https://playwright.dev/)

- 📑 [Finite state machines](./src/machines)

Expand All @@ -61,8 +61,7 @@

Many of this boilerplate features are based on the philosophy of being optional. We understand that every project or product is unique and, therefore, requires different settings and functionalities. We provide you with the freedom to choose the features that best fit your needs so you can only focus on building your product.

- [x] ~Configure next 13 with new /app dir~
- [x] ~Integrate State Management x-state~
- [x] ~Configure next 14 with new /app dir~
- [x] ~Integrate State Management TanStack Query~
- [x] ~Integrate react-hook-form~
- [x] ~Integrate Zod to schema validation~
Expand All @@ -80,12 +79,11 @@ Many of this boilerplate features are based on the philosophy of being optional.
- [x] Integrate planetscale
- [x] Mocking via msw
- [x] Integrate SDK to Subscriptions
- [x] Integrate stripe to payments
- [x] Add MDX support for basic pages
- [x] Add OG image for blog using @vercel/og
- [x] Integrate https://tailwindcss.com/
- [x] Integrate https://mui.com/
- [x] Integrate https://www.radix-ui.com/
- [x] Integrate https://chakra-ui.com/
- [x] Dark mode
- [x] Integrate graphql
- [x] Do `cli` to configure all functions
Expand Down
68 changes: 0 additions & 68 deletions app/Providers.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions app/api/_auth/[...nextauth]/_route.ts

This file was deleted.

16 changes: 0 additions & 16 deletions app/next-auth/SignInProviderButton.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions app/next-auth/SignOutButton.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions app/next-auth/page.tsx

This file was deleted.

78 changes: 0 additions & 78 deletions app/x-state/page.tsx

This file was deleted.

1 change: 0 additions & 1 deletion components/session-status/index.ts

This file was deleted.

18 changes: 0 additions & 18 deletions e2e/example.spec.ts

This file was deleted.

36 changes: 36 additions & 0 deletions e2e/flows/home.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { expect, test } from '@playwright/test';

test.describe('Home Page', () => {
test('must has title', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/X Boilerplate/);
});

// test('get started link', async ({ page }) => {
// await page.goto('/');

// await page.click('text=🍍 State Management X-state');
// await expect(page).toHaveURL(/x-state/);
// await expect(page.locator('h1')).toContainText('🍍');
// await expect(page.getByRole('heading', { name: 'Hi X-State!' })).toBeVisible();
// await expect(page.locator('p')).toContainText('Promise canine example.');
// await expect(page.getByRole('button', { name: 'Get Dog data' })).toBeVisible();
// await expect(page.getByRole('button', { name: 'Reset Dog data' })).toBeVisible();
// await expect(page.getByRole('button', { name: 'Retry Dog data' })).toBeVisible();

// await page.getByRole('button', { name: /Get Dog data/i }).click();
// await expect(page.getByText('Loading Image...')).toBeVisible();
// await expect(page.getByRole('img', { name: 'dog' })).toBeVisible();

// await page.getByRole('button', { name: /Reset Dog data/i }).click();
// await expect(page.getByText('Loading Image...')).not.toBeVisible();
// await expect(page.getByRole('img', { name: 'dog' })).not.toBeVisible();

// await page.getByRole('button', { name: /Retry Dog data/i }).click();
// await expect(page.getByText('Loading Image...')).toBeVisible();
// await expect(page.getByRole('img', { name: 'dog' })).toBeVisible();

// await page.click('text=Go back');
// await expect(page).toHaveURL('/');
// });
});
Loading

0 comments on commit f5a7389

Please sign in to comment.