├── .eslintrc.json ├── jest.setup.js ├── next.config.js ├── postcss.config.js ├── src ├── app │ ├── favicon.ico │ ├── about │ │ ├── loading.tsx │ │ ├── not-found.tsx │ │ ├── error.tsx │ │ └── page.tsx │ ├── login │ │ ├── loading.tsx │ │ ├── not-found.tsx │ │ ├── error.tsx │ │ └── page.tsx │ ├── contact │ │ ├── loading.tsx │ │ ├── not-found.tsx │ │ ├── error.tsx │ │ └── page.tsx │ ├── services │ │ ├── loading.tsx │ │ ├── not-found.tsx │ │ ├── page.tsx │ │ └── error.tsx │ ├── globals.css │ ├── layout.tsx │ └── page.tsx └── components │ ├── index.tsx │ ├── Spinner │ └── Spinner.tsx │ ├── Footer │ └── Footer.tsx │ └── Navbar │ └── Navbar.tsx ├── .gitignore ├── tailwind.config.ts ├── public ├── vercel.svg └── next.svg ├── jest.config.js ├── tsconfig.json ├── __tests__ ├── Home.test.tsx └── Services.test.tsx ├── package.json └── README.md /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /jest.setup.js: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-dom/extend-expect' 2 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | module.exports = nextConfig 5 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zied-snoussi/nextjs13-reactjs-typescript-tailwindcss-jest-starter-frontend/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /src/components/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as Footer } from './Footer/Footer' 2 | export { default as Navbar } from './Navbar/Navbar' 3 | export { default as Spinner } from './Spinner/Spinner' -------------------------------------------------------------------------------- /src/app/about/loading.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from '@/components' 2 | import React from 'react' 3 | 4 | const loading = () => { 5 | return ( 6 | <> 7 | 8 | 9 | ) 10 | } 11 | 12 | export default loading -------------------------------------------------------------------------------- /src/app/login/loading.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from '@/components' 2 | import React from 'react' 3 | 4 | const loading = () => { 5 | return ( 6 | <> 7 | 8 | 9 | ) 10 | } 11 | 12 | export default loading -------------------------------------------------------------------------------- /src/app/contact/loading.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from '@/components' 2 | import React from 'react' 3 | 4 | const loading = () => { 5 | return ( 6 | <> 7 | 8 | 9 | ) 10 | } 11 | 12 | export default loading -------------------------------------------------------------------------------- /src/app/services/loading.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from '@/components' 2 | import React from 'react' 3 | 4 | const loading = () => { 5 | return ( 6 | <> 7 | 8 | 9 | ) 10 | } 11 | 12 | export default loading -------------------------------------------------------------------------------- /src/app/about/not-found.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import React from 'react' 3 | 4 | const NotFound = () => { 5 | return ( 6 |
7 |

Not Found

8 |

Could not find requested resource

9 | Return Home 10 |
11 | ) 12 | } 13 | 14 | export default NotFound -------------------------------------------------------------------------------- /src/app/login/not-found.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import React from 'react' 3 | 4 | const NotFound = () => { 5 | return ( 6 |
7 |

Not Found

8 |

Could not find requested resource

9 | Return Home 10 |
11 | ) 12 | } 13 | 14 | export default NotFound -------------------------------------------------------------------------------- /src/app/contact/not-found.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import React from 'react' 3 | 4 | const NotFound = () => { 5 | return ( 6 |
7 |

Not Found

8 |

Could not find requested resource

9 | Return Home 10 |
11 | ) 12 | } 13 | 14 | export default NotFound -------------------------------------------------------------------------------- /src/app/services/not-found.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import React from 'react' 3 | 4 | const NotFound = () => { 5 | return ( 6 |
7 |

Not Found

8 |

Could not find requested resource

9 | Return Home 10 |
11 | ) 12 | } 13 | 14 | export default NotFound -------------------------------------------------------------------------------- /src/components/Spinner/Spinner.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Spinner = () => { 4 | return ( 5 |
6 |
7 |
8 | ); 9 | }; 10 | 11 | export default Spinner; 12 | -------------------------------------------------------------------------------- /src/components/Footer/Footer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Footer = () => { 4 | return ( 5 |
6 |
7 |

© {new Date().getFullYear()} Your Company Name

8 |
9 |
10 | ); 11 | }; 12 | 13 | export default Footer; 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from 'tailwindcss' 2 | 3 | const config: Config = { 4 | content: [ 5 | './src/pages/**/*.{js,ts,jsx,tsx,mdx}', 6 | './src/components/**/*.{js,ts,jsx,tsx,mdx}', 7 | './src/app/**/*.{js,ts,jsx,tsx,mdx}', 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 13 | 'gradient-conic': 14 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | } 20 | export default config 21 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | @media (prefers-color-scheme: dark) { 12 | :root { 13 | --foreground-rgb: 255, 255, 255; 14 | --background-start-rgb: 0, 0, 0; 15 | --background-end-rgb: 0, 0, 0; 16 | } 17 | } 18 | 19 | body { 20 | color: rgb(var(--foreground-rgb)); 21 | background: linear-gradient( 22 | to bottom, 23 | transparent, 24 | rgb(var(--background-end-rgb)) 25 | ) 26 | rgb(var(--background-start-rgb)); 27 | } 28 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Footer, Navbar } from '@/components' 2 | import './globals.css' 3 | import type { Metadata } from 'next' 4 | import { Inter } from 'next/font/google' 5 | 6 | const inter = Inter({ subsets: ['latin'] }) 7 | 8 | export const metadata: Metadata = { 9 | title: 'Starter Next App', 10 | description: 'Generated by create next app', 11 | } 12 | 13 | export default function RootLayout({ 14 | children, 15 | }: { 16 | children: React.ReactNode 17 | }) { 18 | return ( 19 | 20 | 21 | 22 | {children} 23 |