diff --git a/apps/web/.eslintrc.js b/apps/web/.eslintrc.js
index a61df95..0370b88 100644
--- a/apps/web/.eslintrc.js
+++ b/apps/web/.eslintrc.js
@@ -5,4 +5,7 @@ module.exports = createConfig('next-typescript', {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
+ rules: {
+ 'import/no-duplicates': 'off',
+ },
});
diff --git a/apps/web/.gitignore b/apps/web/.gitignore
index 1437c53..55175ef 100644
--- a/apps/web/.gitignore
+++ b/apps/web/.gitignore
@@ -23,12 +23,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+.pnpm-debug.log*
# local env files
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
+.env*.local
# vercel
.vercel
diff --git a/apps/web/README.md b/apps/web/README.md
index 3d7b63a..64c6572 100644
--- a/apps/web/README.md
+++ b/apps/web/README.md
@@ -1,6 +1,34 @@
-## Getting Started
+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).
-First, run the development server:
+Live demo: [https://flowbite-next-starter.vercel.app/](https://flowbite-next-starter.vercel.app/)
+
+It also includes:
+
+- [x] [`flowbite`](https://flowbite.com)
+- [x] [`flowbite-react`](https://flowbite-react.com)
+- [x] [`react-icons`](https://react-icons.github.io/react-icons)
+- [x] [`tailwindcss`](https://tailwindcss.com)
+- [x] Quality of life tools, like
+ - [x] [`eslint`](https://eslint.org) with some plugins
+ - [x] [`prettier`](https://prettier.io)
+
+## Getting started
+
+`Next.js` requires [`Node.js`](https://nodejs.org).
+
+If you don't already have `npm` and `yarn` available, make sure you set them up.
+
+```bash
+npm i -g npm yarn
+```
+
+Install the dependencies:
+
+```bash
+yarn install
+```
+
+Now you can run the development server:
```bash
yarn dev
@@ -8,21 +36,101 @@ yarn dev
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
-You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
-To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3000/api/hello](http://localhost:3000/api/hello).
+## Add `flowbite-react` to `next` on your own
-## Learn More
+Follow these steps to add `flowbite-react` to a `next` project without cloning this repo.
+
+### Requirements
+
+- [x] [Node.js](https://nodejs.org/en/)
+
+### How-to
+
+#### Create a new `next` starter project:
+
+```sh
+npx create-next-app@latest --typescript
+cd my-app
+```
+
+#### Install `tailwindcss` and `flowbite-react`:
+
+```sh
+npm install --save autoprefixer postcss tailwindcss flowbite flowbite-react
+```
+
+#### Create `postcss.config.js`:
+
+```js
+module.exports = {
+ plugins: {
+ autoprefixer: {},
+ tailwindcss: {},
+ },
+};
+```
+
+#### Create `tailwind.config.js`:
+
+```js
+/**
+ * @type {import('@types/tailwindcss/tailwind-config').TailwindConfig}
+ */
+module.exports = {
+ content: [
+ "./node_modules/flowbite-react/**/*.js",
+ "./pages/**/*.{ts,tsx}",
+ "./public/**/*.html",
+ ],
+ plugins: [require("flowbite/plugin")],
+ theme: {},
+};
+```
+
+#### And replace the contents of `styles/globals.css` by:
+
+```css
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+```
+
+#### Start using `flowbite-react`!
+
+```js
+import { Alert } from "flowbite-react";
+
+export default function MyPage() {
+ return Alert!;
+}
+```
+
+## Outstanding issues
+
+- **Carousel**s don't seem to work with [`next/image`](https://nextjs.org/docs/api-reference/next/image), so a normal `` is required, which ESLint will warn about
+- **Modal**s don't work on `next` on `react@18` because of an hydration mismatch
+
+## Learn more
+
+### About `next`
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
+- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
-## Deploy on Vercel
+### About `flowbite`
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
+[Flowbite](https://flowbite.com) is an open source collection of UI components built with the utility classes from Tailwind CSS that you can use as a starting point when coding user interfaces and websites.
+
+In this repository, we setup [`flowbite-react`](https://flowbite-react.com) for you with examples of how to use the React components in `pages/index.tsx`.
+
+## Deploy on `vercel`
+
+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.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
diff --git a/apps/web/app/components/header.tsx b/apps/web/app/components/header.tsx
new file mode 100644
index 0000000..8addadc
--- /dev/null
+++ b/apps/web/app/components/header.tsx
@@ -0,0 +1,77 @@
+import { useSidebarContext } from '../context/SidebarContext';
+import { DarkThemeToggle, Navbar } from 'flowbite-react';
+import Image from 'next/image';
+
+function Header() {
+ const { isOpenOnSmallScreens, isPageWithSidebar, setOpenOnSmallScreens } =
+ useSidebarContext();
+
+ return (
+
+
+ {isPageWithSidebar && (
+
+ )}
+
+
+
+ Flowbite
+
+
+
+
+
+
+
+
+ Home
+
+ About
+ Services
+ Pricing
+ Contact
+
+
+
+ );
+}
+
+export default Header;
diff --git a/apps/web/app/components/sidebar.tsx b/apps/web/app/components/sidebar.tsx
new file mode 100644
index 0000000..da3b5e6
--- /dev/null
+++ b/apps/web/app/components/sidebar.tsx
@@ -0,0 +1,26 @@
+import { useSidebarContext } from '../context/SidebarContext';
+import classNames from 'classnames';
+import { Sidebar as FlowbiteSidebar } from 'flowbite-react';
+import type { FC, PropsWithChildren } from 'react';
+
+const Sidebar: FC>> = function ({
+ children,
+}) {
+ const { isOpenOnSmallScreens: isSidebarOpenOnSmallScreens } =
+ useSidebarContext();
+
+ return (
+
+ );
+}
+
+function AccordionExample(): JSX.Element {
+ return (
+
+
+ What is Flowbite?
+
+
+ Flowbite is an open-source library of interactive components built
+ on top of Tailwind CSS including buttons, dropdowns, modals,
+ navbars, and more.
+
+
+ Check out this guide to learn how to{' '}
+
+ get started
+ {' '}
+ and start developing websites even faster with components on top of
+ Tailwind CSS.
+
+
+
+
+ Is there a Figma file available?
+
+
+ Flowbite is first conceptualized and designed using the Figma
+ software so everything you see in the library has a design
+ equivalent in our Figma file.
+
+
+ Check out the{' '}
+
+ Figma design system
+ {' '}
+ based on the utility classes from Tailwind CSS and components from
+ Flowbite.
+
+
+
+
+
+ What are the differences between Flowbite and Tailwind UI?
+
+
+
+ The main difference is that the core components from Flowbite are
+ open source under the MIT license, whereas Tailwind UI is a paid
+ product. Another difference is that Flowbite relies on smaller and
+ standalone components, whereas Tailwind UI offers sections of pages.
+
+
+ However, we actually recommend using both Flowbite, Flowbite Pro,
+ and even Tailwind UI as there is no technical reason stopping you
+ from using the best of two worlds.
+
+ More info about this info alert goes here. This example text is
+ going to run a bit longer so that you can see how spacing within an
+ alert works with this kind of content.
+
+ With less than a month to go before the European Union enacts new
+ consumer privacy laws for its citizens, companies around the world
+ are updating their terms of service agreements to comply.
+
+
+ The European Union’s General Data Protection Regulation (G.D.P.R.)
+ goes into effect on May 25 and is meant to ensure a common set of
+ data rights in the European Union. It requires organizations to
+ notify users as soon as possible of high-risk data breaches that
+ could personally affect them.
+
+ );
+}
+
+function TabsExample(): JSX.Element {
+ return (
+
+
+ Profile content
+
+
+ Dashboard content
+
+
+ Settings content
+
+
+ Contacts content
+
+
+ Disabled content
+
+
+ );
+}
+
+function TimelineExample(): JSX.Element {
+ return (
+
+
+
+
+ February 2022
+ Application UI code in Tailwind CSS
+
+ Get access to over 20+ pages including a dashboard layout, charts,
+ kanban board, calendar, and pre-order E-commerce & Marketing pages.
+
+
+
+
+
+
+
+ March 2022
+ Marketing UI design in Figma
+
+ All of the pages and components are first designed in Figma and we
+ keep a parity between the two versions even as we update the
+ project.
+
+
+
+
+
+
+ April 2022
+ E-Commerce UI code in Tailwind CSS
+
+ Get started with dozens of web components and interactive elements
+ built on top of Tailwind CSS.
+
+
+
+
+ );
+}
+
+function ToastExample(): JSX.Element {
+ return (
+