diff --git a/apps/api/.eslintrc.json b/apps/api/.eslintrc.json deleted file mode 100644 index 3722418..0000000 --- a/apps/api/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["next/core-web-vitals", "next/typescript"] -} diff --git a/apps/api/.gitignore b/apps/api/.gitignore index 26b002a..2804238 100644 --- a/apps/api/.gitignore +++ b/apps/api/.gitignore @@ -1,40 +1,31 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins +# dev +.vercel/ +.yarn/ !.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug +.vscode/* +!.vscode/launch.json +!.vscode/*.code-snippets +.idea/workspace.xml +.idea/usage.statistics.xml +.idea/shelf + +# deps +node_modules/ + +# env +.env +.env.production + +# logs +logs/ +*.log npm-debug.log* yarn-debug.log* yarn-error.log* +pnpm-debug.log* +lerna-debug.log* -# env files (can opt-in for commiting if needed) -.env* +# misc +.DS_Store -# vercel .vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile deleted file mode 100644 index c622531..0000000 --- a/apps/api/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM node:20.12.0-alpine3.19 - -WORKDIR /usr/src/app - -COPY package.json package-lock.json turbo.json tsconfig.json ./ - - -COPY apps ./apps -COPY packages ./packages - -RUN npm install - -RUN npm run build - - -CMD ["npm", "run", "start-api"] \ No newline at end of file diff --git a/apps/api/README.md b/apps/api/README.md index e215bc4..2196aa0 100644 --- a/apps/api/README.md +++ b/apps/api/README.md @@ -1,36 +1,4 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/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/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## 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/app/building-your-application/deploying) for more details. +npm install +npm run start +``` diff --git a/apps/api/api/index.ts b/apps/api/api/index.ts new file mode 100644 index 0000000..05d4967 --- /dev/null +++ b/apps/api/api/index.ts @@ -0,0 +1,14 @@ +import { Hono } from 'hono' +import { handle } from 'hono/vercel' + +export const config = { + runtime: 'edge' +} + +const app = new Hono().basePath('/api') + +app.get('/', (c) => { + return c.json({ message: 'Hello Hono!' }) +}) + +export default handle(app) diff --git a/apps/api/app/route.ts b/apps/api/app/route.ts deleted file mode 100644 index 30b9115..0000000 --- a/apps/api/app/route.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Import the Next.js Response object -import { NextResponse } from 'next/server'; - -// Define the GET request handler -export async function GET() { - return NextResponse.json({ message: "Hello, Next.js!" }); -} diff --git a/apps/api/next.config.ts b/apps/api/next.config.ts deleted file mode 100644 index b39d782..0000000 --- a/apps/api/next.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { NextConfig } from "next"; - -const nextConfig: NextConfig = { - eslint: { - ignoreDuringBuilds: true, - }, - typescript: { - ignoreBuildErrors: true, - }, - reactStrictMode: true, -}; - -export default nextConfig; diff --git a/apps/api/package.json b/apps/api/package.json index 8cc4aa8..430634f 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -1,27 +1,13 @@ { "name": "api", - "version": "0.1.0", - "private": true, "scripts": { - "dev": "next dev --turbopack", - "build": "next build", - "start": "next start", - "lint": "next lint", - "start-api": " cd ./apps/api && npm start" + "start": "vercel dev", + "deploy": "vercel --prod" }, "dependencies": { - "react": "19.0.0-rc-02c0e824-20241028", - "react-dom": "19.0.0-rc-02c0e824-20241028", - "next": "15.0.2" + "hono": "^4.6.9" }, "devDependencies": { - "typescript": "^5", - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "eslint": "^8", - "eslint-config-next": "15.0.2" + "vercel": "^32.4.1" } -} +} \ No newline at end of file diff --git a/apps/api/postcss.config.mjs b/apps/api/postcss.config.mjs deleted file mode 100644 index 1a69fd2..0000000 --- a/apps/api/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/apps/api/public/favicon.ico b/apps/api/public/favicon.ico new file mode 100644 index 0000000..5431643 Binary files /dev/null and b/apps/api/public/favicon.ico differ diff --git a/apps/api/public/file.svg b/apps/api/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/apps/api/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/api/public/globe.svg b/apps/api/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/apps/api/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/api/public/next.svg b/apps/api/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/apps/api/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/api/public/vercel.svg b/apps/api/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/apps/api/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/api/public/window.svg b/apps/api/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/apps/api/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/api/src/app/404/page.tsx b/apps/api/src/app/404/page.tsx deleted file mode 100644 index ba507ca..0000000 --- a/apps/api/src/app/404/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default function Page404() { - return ( -
404
- ) -} \ No newline at end of file diff --git a/apps/api/src/app/api/hello/route.ts b/apps/api/src/app/api/hello/route.ts deleted file mode 100644 index b78c5c7..0000000 --- a/apps/api/src/app/api/hello/route.ts +++ /dev/null @@ -1,6 +0,0 @@ - -export function GET(req:Request) { - return new Response("Hello from Next.js on Vercel!", { - status: 200, - }); -} \ No newline at end of file diff --git a/apps/api/src/app/error.tsx b/apps/api/src/app/error.tsx deleted file mode 100644 index 478573a..0000000 --- a/apps/api/src/app/error.tsx +++ /dev/null @@ -1,6 +0,0 @@ -"use client" -export default function Error() { - return ( -
error
- ) -} \ No newline at end of file diff --git a/apps/api/src/app/layout.tsx b/apps/api/src/app/layout.tsx deleted file mode 100644 index 6c6f291..0000000 --- a/apps/api/src/app/layout.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function RootLayout({ children }: { children: React.ReactNode }) { - return ( - - {children} - - ) -} \ No newline at end of file diff --git a/apps/api/src/app/page.tsx b/apps/api/src/app/page.tsx deleted file mode 100644 index 21e600d..0000000 --- a/apps/api/src/app/page.tsx +++ /dev/null @@ -1,8 +0,0 @@ - -function page() { - return ( -
page
- ) -} - -export default page \ No newline at end of file diff --git a/apps/api/tailwind.config.ts b/apps/api/tailwind.config.ts deleted file mode 100644 index d43da91..0000000 --- a/apps/api/tailwind.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -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: { - colors: { - background: "var(--background)", - foreground: "var(--foreground)", - }, - }, - }, - plugins: [], -}; -export default config; diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index d8b9323..d52390f 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -1,27 +1,10 @@ { "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "node", + "esModuleInterop": true, "skipLibCheck": true, "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./*"] - } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} +} \ No newline at end of file diff --git a/apps/api/vercel.json b/apps/api/vercel.json new file mode 100644 index 0000000..7f9ff0a --- /dev/null +++ b/apps/api/vercel.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/api/(.*)", + "destination": "/api" + } + ] +} \ No newline at end of file