diff --git a/src/client/.eslintrc.json b/src/client/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/src/client/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/src/client/.gitignore b/src/client/.gitignore new file mode 100644 index 0000000..c87c9b3 --- /dev/null +++ b/src/client/.gitignore @@ -0,0 +1,36 @@ +# 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 +next-env.d.ts diff --git a/src/client/README.md b/src/client/README.md new file mode 100644 index 0000000..5bc7ca2 --- /dev/null +++ b/src/client/README.md @@ -0,0 +1,38 @@ +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 +``` + +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. + +[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. + +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/src/client/next.config.js b/src/client/next.config.js new file mode 100644 index 0000000..dafb0c8 --- /dev/null +++ b/src/client/next.config.js @@ -0,0 +1,8 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + experimental: { + appDir: true, + }, +} + +module.exports = nextConfig diff --git a/src/client/package.json b/src/client/package.json new file mode 100644 index 0000000..15448c4 --- /dev/null +++ b/src/client/package.json @@ -0,0 +1,22 @@ +{ + "name": "client", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@types/node": "18.15.3", + "@types/react": "18.0.28", + "@types/react-dom": "18.0.11", + "eslint": "8.36.0", + "eslint-config-next": "13.2.4", + "next": "13.2.4", + "react": "18.2.0", + "react-dom": "18.2.0", + "typescript": "5.0.2" + } +} diff --git a/src/client/public/next.svg b/src/client/public/next.svg new file mode 100644 index 0000000..5bb00d4 --- /dev/null +++ b/src/client/public/next.svg @@ -0,0 +1 @@ + diff --git a/src/client/public/thirteen.svg b/src/client/public/thirteen.svg new file mode 100644 index 0000000..db65b53 --- /dev/null +++ b/src/client/public/thirteen.svg @@ -0,0 +1 @@ + diff --git a/src/client/public/vercel.svg b/src/client/public/vercel.svg new file mode 100644 index 0000000..1aeda7d --- /dev/null +++ b/src/client/public/vercel.svg @@ -0,0 +1 @@ + diff --git a/src/client/src/app/api/hello/route.ts b/src/client/src/app/api/hello/route.ts new file mode 100644 index 0000000..d1cc6ee --- /dev/null +++ b/src/client/src/app/api/hello/route.ts @@ -0,0 +1,3 @@ +export async function GET(request: Request) { + return new Response('Hello, Next.js!') +} diff --git a/src/client/src/app/favicon.ico b/src/client/src/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/src/client/src/app/favicon.ico differ diff --git a/src/client/src/app/layout.tsx b/src/client/src/app/layout.tsx new file mode 100644 index 0000000..3d9d723 --- /dev/null +++ b/src/client/src/app/layout.tsx @@ -0,0 +1,18 @@ +import './globals.css' + +export const metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/src/client/src/app/page.tsx b/src/client/src/app/page.tsx new file mode 100644 index 0000000..32260d7 --- /dev/null +++ b/src/client/src/app/page.tsx @@ -0,0 +1,94 @@ +import Image from 'next/image' +import { Inter } from 'next/font/google' +import { CssBaseline } from '@material-ui/core'; +import { ThemeProvider } from '@material-ui/core/styles'; +import { theme } from '../theme'; +import styles from './page.module.css' + +const inter = Inter({ subsets: ['latin'] }) + +export default function Home() { + return ( +
+
+

+ Get started by editing  + src/app/page.tsx +

+
+ + By{' '} + Vercel Logo + +
+
+ +
+ Next.js Logo +
+ 13 +
+
+ +
+ +

+ Docs -> +

+

+ Find in-depth information about Next.js features and API. +

+
+ + +

+ Templates -> +

+

Explore the Next.js 13 playground.

+
+ + +

+ Deploy -> +

+

+ Instantly deploy your Next.js site to a shareable URL with Vercel. +

+
+
+
+ ) +} diff --git a/src/client/src/types/index.tsx b/src/client/src/types/index.tsx new file mode 100644 index 0000000..ab5cce3 --- /dev/null +++ b/src/client/src/types/index.tsx @@ -0,0 +1,18 @@ +// Path: types/index.tsx + +export interface IBook { + book_id: string + title: string + author: string + categories: string + cover: string + pages: string + progress: string + file_name: string + description: string + date: string + rights: string + tags: string + identifier: string + publisher: string +} diff --git a/src/client/theme.tsx b/src/client/theme.tsx new file mode 100644 index 0000000..78f5127 --- /dev/null +++ b/src/client/theme.tsx @@ -0,0 +1,20 @@ +import { createTheme } from @material-ui/core/styles; + +const theme = createTheme({ + palette: { + primary: { + main: '#556cd6', + }, + secondary: { + main: '#19857b', + }, + error: { + main: '#f44336', + }, + background: { + default: '#fff', + }, + }, +}); + +export { theme }; diff --git a/src/client/tsconfig.json b/src/client/tsconfig.json new file mode 100644 index 0000000..0c7555f --- /dev/null +++ b/src/client/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}