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

feat: Migrate to Next.js #254

Closed
wants to merge 19 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"@typescript-eslint/no-explicit-any": ["error", {"ignoreRestArgs": true}]
// Add other TypeScript rules as needed
},
"ignorePatterns": ["node_modules/", "build/"]
"ignorePatterns": ["node_modules/", "build/", "marketing/"]
}
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,11 @@ jobs:
uses: codespell-project/actions-codespell@v2
with:
ignore_words_file: .github/codespell-ignore
skip: .git,**/*.png,**/*.gif,**/*.jpg,**/*.svg,**/*.ico,**/*.json,package.json,package-lock.json,*.lock,*.excalidraw
skip: .git,**/*.png,**/*.gif,**/*.jpg,**/*.svg,**/*.ico,**/*.json,package.json,package-lock.json,*.lock,*.excalidraw,HeroImage.tsx

- name: Install and Build 🔧
run: |
npm install
npx prettier --check "**/*.{graphql,yml,json,md,sh,ts,tsx,js}"
npm run typecheck
npm run build

- name: Deploy 🚀
if: github.ref == 'refs/heads/develop'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build
cd marketing && npm run build
55 changes: 28 additions & 27 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
},
],
url: "https://tailcall.run",
baseUrl: "/",
baseUrl: "/docs",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "images/favicon.ico",
Expand Down Expand Up @@ -61,6 +61,7 @@ export default {
anonymizeIP: false,
},
docs: {
routeBasePath: "/", // Serve the docs at the site's root
// docRootComponent: require.resolve("./src/components/docs/Layout.tsx"),
sidebarPath: require.resolve("./sidebars.ts"),
showLastUpdateTime: true,
Expand Down Expand Up @@ -131,56 +132,56 @@ export default {
to: "/",
},
{
from: "/docs/guides/n+1/",
to: "/docs/graphql-n-plus-one-problem-solved-tailcall/",
from: "/guides/n+1/",
to: "/graphql-n-plus-one-problem-solved-tailcall/",
},
{
from: "/docs/intro/architecture",
to: "/docs/",
from: "/intro/architecture",
to: "/",
},
{
from: "/docs/intro/cli/",
to: "/docs/tailcall-graphql-cli/",
from: "/intro/cli/",
to: "/tailcall-graphql-cli/",
},
{
from: "/docs/intro/operators/",
to: "/docs/tailcall-dsl-graphql-custom-directives/",
from: "/intro/operators/",
to: "/tailcall-dsl-graphql-custom-directives/",
},
{
from: "/docs/intro/server",
to: "/docs/",
from: "/intro/server",
to: "/",
},
{
from: "/docs/getting-started-with-graphql/",
to: "/docs/",
from: "/getting-started-with-graphql/",
to: "/",
},
{
from: "/docs/operators/add-field/",
to: "/docs/tailcall-dsl-graphql-custom-directives/#addfield-directive",
from: "/operators/add-field/",
to: "/tailcall-dsl-graphql-custom-directives/#addfield-directive",
},
{
from: "/docs/operators/graphql/",
to: "/docs/tailcall-dsl-graphql-custom-directives/#graphql-directive",
from: "/operators/graphql/",
to: "/tailcall-dsl-graphql-custom-directives/#graphql-directive",
},
{
from: "/docs/operators/http/",
to: "/docs/tailcall-dsl-graphql-custom-directives/#http-directive",
from: "/operators/http/",
to: "/tailcall-dsl-graphql-custom-directives/#http-directive",
},
{
from: "/docs/operators/server/",
to: "/docs/tailcall-dsl-graphql-custom-directives/#server-directive",
from: "/operators/server/",
to: "/tailcall-dsl-graphql-custom-directives/#server-directive",
},
{
from: "/docs/operators/telemetry/",
to: "/docs/tailcall-dsl-graphql-custom-directives/#telemetry-directive",
from: "/operators/telemetry/",
to: "/tailcall-dsl-graphql-custom-directives/#telemetry-directive",
},
{
from: "/docs/operators/upstream/",
to: "/docs/tailcall-dsl-graphql-custom-directives/#upstream-directive",
from: "/operators/upstream/",
to: "/tailcall-dsl-graphql-custom-directives/#upstream-directive",
},
{
from: "/docs/n+1/introduction/",
to: "/docs/graphql-n-plus-one-problem-solved-tailcall/",
from: "/n+1/introduction/",
to: "/graphql-n-plus-one-problem-solved-tailcall/",
},
{
from: "/enterprise/",
Expand Down
7 changes: 7 additions & 0 deletions marketing/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "next/core-web-vitals",
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
39 changes: 39 additions & 0 deletions marketing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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

public/docs
public/graphql
36 changes: 36 additions & 0 deletions marketing/README.md
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 15 additions & 0 deletions marketing/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
rewrites: async () => [
{
source: '/docs/:path*',
destination: "/docs/:path*/index.html",
},
{
source: '/graphql/:path*',
destination: "/docs/:path*/index.html",
},
],
}

export default nextConfig
38 changes: 38 additions & 0 deletions marketing/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "marketing",
"version": "0.1.1",
"private": true,
"scripts": {
"dev": "next dev",
"build": "cd ../ && npm run build && cd marketing && next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@docusaurus/theme-classic": "^3.3.2",
"@docusaurus/theme-common": "^3.3.2",
"graphiql-tc": "^3.2.3",
"lottie-react": "^2.4.0",
"lottie-web": "^5.12.2",
"next": "14.2.3",
"react": "^18",
"react-countup": "^6.5.3",
"react-dom": "^18",
"react-fast-marquee": "^1.6.4",
"react-ga4": "^2.1.0",
"react-intersection-observer": "^9.10.2",
"react-on-screen": "^2.1.1",
"styled-jsx": "^5.1.6",
"tailwind-merge": "^2.3.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
8 changes: 8 additions & 0 deletions marketing/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
}

export default config
Empty file added marketing/public/.nojekyll
Empty file.
Binary file added marketing/public/animations/about-us-visual.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading