diff --git a/apps/documentation/.gitignore b/apps/documentation/.gitignore new file mode 100644 index 000000000..fd3dbb571 --- /dev/null +++ b/apps/documentation/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/apps/documentation/README.md b/apps/documentation/README.md new file mode 100644 index 000000000..c4033664f --- /dev/null +++ b/apps/documentation/README.md @@ -0,0 +1,36 @@ +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). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun 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. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +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) - 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 + +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/documentation/app/favicon.ico b/apps/documentation/app/favicon.ico new file mode 100644 index 000000000..718d6fea4 Binary files /dev/null and b/apps/documentation/app/favicon.ico differ diff --git a/apps/documentation/app/globals.css b/apps/documentation/app/globals.css new file mode 100644 index 000000000..875c01e81 --- /dev/null +++ b/apps/documentation/app/globals.css @@ -0,0 +1,33 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + transparent, + rgb(var(--background-end-rgb)) + ) + rgb(var(--background-start-rgb)); +} + +@layer utilities { + .text-balance { + text-wrap: balance; + } +} diff --git a/apps/documentation/app/layout.tsx b/apps/documentation/app/layout.tsx new file mode 100644 index 000000000..3314e4780 --- /dev/null +++ b/apps/documentation/app/layout.tsx @@ -0,0 +1,22 @@ +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import "./globals.css"; + +const inter = Inter({ subsets: ["latin"] }); + +export const metadata: Metadata = { + title: "Create Next App", + description: "Generated by create next app", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + {children} + + ); +} diff --git a/apps/documentation/next.config.js b/apps/documentation/next.config.js new file mode 100644 index 000000000..718eb6bf2 --- /dev/null +++ b/apps/documentation/next.config.js @@ -0,0 +1,9 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +const withNextra = require('nextra')({ + theme: 'nextra-theme-docs', + themeConfig: './theme.config.jsx', +}); + +module.exports = withNextra(nextConfig); diff --git a/apps/documentation/package.json b/apps/documentation/package.json new file mode 100644 index 000000000..95cff4950 --- /dev/null +++ b/apps/documentation/package.json @@ -0,0 +1,27 @@ +{ + "name": "documentation", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev -p 3002", + "build": "next build", + "start": "next start -p 3002", + "lint": "next lint" + }, + "dependencies": { + "next": "14.1.4", + "nextra": "^2.13.4", + "nextra-theme-docs": "^2.13.4", + "react": "^18", + "react-dom": "^18" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "autoprefixer": "^10.0.1", + "postcss": "^8", + "tailwindcss": "^3.3.0", + "typescript": "^5" + } +} diff --git a/apps/documentation/pages/_meta.json b/apps/documentation/pages/_meta.json new file mode 100644 index 000000000..370d66636 --- /dev/null +++ b/apps/documentation/pages/_meta.json @@ -0,0 +1,10 @@ +{ + "index": "My Homepage", + "contact": "Contact Us", + "about": "About Us", + "GitHub": { + "text": "View on GitHub", + "href": "https://documen.so/github", + "newWindow": true + } +} diff --git a/apps/documentation/pages/index.mdx b/apps/documentation/pages/index.mdx new file mode 100644 index 000000000..ffe864ac6 --- /dev/null +++ b/apps/documentation/pages/index.mdx @@ -0,0 +1,3 @@ +# Hello world + +Hey there! diff --git a/apps/documentation/postcss.config.js b/apps/documentation/postcss.config.js new file mode 100644 index 000000000..12a703d90 --- /dev/null +++ b/apps/documentation/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/apps/documentation/tailwind.config.ts b/apps/documentation/tailwind.config.ts new file mode 100644 index 000000000..7e4bd91a0 --- /dev/null +++ b/apps/documentation/tailwind.config.ts @@ -0,0 +1,20 @@ +import type { Config } from "tailwindcss"; + +const config: Config = { + content: [ + "./pages/**/*.{js,ts,jsx,tsx,mdx}", + "./components/**/*.{js,ts,jsx,tsx,mdx}", + "./app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: { + backgroundImage: { + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", + }, + }, + }, + plugins: [], +}; +export default config; diff --git a/apps/documentation/theme.config.jsx b/apps/documentation/theme.config.jsx new file mode 100644 index 000000000..1d7e860cb --- /dev/null +++ b/apps/documentation/theme.config.jsx @@ -0,0 +1,7 @@ +export default { + logo: My Nextra Documentation, + project: { + link: 'https://github.com/shuding/nextra', + }, + // ... other theme options +}; diff --git a/apps/documentation/tsconfig.json b/apps/documentation/tsconfig.json new file mode 100644 index 000000000..f07a1af59 --- /dev/null +++ b/apps/documentation/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + }, + "forceConsistentCasingInFileNames": true + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}