From c766eb6f432c8249426ea3e67245d2571915fea4 Mon Sep 17 00:00:00 2001 From: Ali Sharafi Date: Tue, 2 Aug 2022 17:44:56 +0430 Subject: [PATCH 01/13] project setup --- .eslintrc.json | 3 + .gitignore | 35 + README.md | 34 + components/layout/layout.tsx | 12 + db/.env.hasura | 7 + db/.env.pg | 3 + db/config.yaml | 7 + db/docker-compose.yml | 22 + next-env.d.ts | 5 + next.config.js | 7 + package-lock.json | 5956 ++++++++++++++++++++++++++++++++++ package.json | 27 + pages/_app.tsx | 8 + pages/api/hello.ts | 13 + pages/index.tsx | 72 + public/favicon.ico | Bin 0 -> 25931 bytes public/vercel.svg | 4 + styles/Home.module.css | 129 + styles/globals.css | 26 + tsconfig.json | 20 + yarn.lock | 2005 ++++++++++++ 21 files changed, 8395 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 README.md create mode 100644 components/layout/layout.tsx create mode 100644 db/.env.hasura create mode 100644 db/.env.pg create mode 100644 db/config.yaml create mode 100644 db/docker-compose.yml create mode 100644 next-env.d.ts create mode 100644 next.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pages/_app.tsx create mode 100644 pages/api/hello.ts create mode 100644 pages/index.tsx create mode 100644 public/favicon.ico create mode 100644 public/vercel.svg create mode 100644 styles/Home.module.css create mode 100644 styles/globals.css create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..737d872 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo diff --git a/README.md b/README.md new file mode 100644 index 0000000..c87e042 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +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 +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## 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/components/layout/layout.tsx b/components/layout/layout.tsx new file mode 100644 index 0000000..936b686 --- /dev/null +++ b/components/layout/layout.tsx @@ -0,0 +1,12 @@ +import Navbar from './navbar' +import Footer from './footer' + +export default function Layout({ children }) { + return ( + <> + +
{children}
+