├── .eslintrc.json ├── .gitignore ├── .prettierrc ├── README.md ├── app ├── (auth) │ ├── layout.jsx │ ├── signin │ │ └── page.jsx │ └── signout │ │ └── page.jsx ├── (site) │ ├── footer.jsx │ ├── globals.css │ ├── head.jsx │ ├── header.jsx │ ├── layout.jsx │ ├── page.jsx │ ├── provider.jsx │ └── users │ │ ├── [userId] │ │ ├── error.jsx │ │ ├── page.jsx │ │ ├── tweet.jsx │ │ └── user.jsx │ │ ├── layout.jsx │ │ ├── loading.jsx │ │ ├── page.jsx │ │ └── users.jsx └── components │ ├── auth │ ├── GoogleSignInButton.jsx │ └── SignInButton.jsx │ ├── form │ └── TextField.jsx │ └── ui │ └── button.jsx ├── jsconfig.json ├── lib ├── prisma │ ├── index.js │ ├── tweets.js │ └── users.js └── utils │ └── index.js ├── next.config.js ├── package.json ├── pages └── api │ ├── auth │ └── [...nextauth].js │ ├── tweets │ └── [tweetId] │ │ ├── like │ │ └── index.js │ │ └── unlike │ │ └── index.js │ └── users │ ├── [userId] │ └── index.js │ └── index.js ├── pnpm-lock.yaml ├── postcss.config.js ├── prisma └── schema.prisma ├── public ├── favicon.ico └── vercel.svg └── tailwind.config.js /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.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 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "singleQuote": true, 4 | "jsxSingleQuote": true, 5 | "tabWidth": 2, 6 | "trailingComma": "none", 7 | "semi": false, 8 | "proseWrap": "always", 9 | "printWidth": 80 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 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). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | ``` 12 | 13 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 14 | 15 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 16 | 17 | [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`. 18 | 19 | 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. 20 | 21 | ## Learn More 22 | 23 | To learn more about Next.js, take a look at the following resources: 24 | 25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 27 | 28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 29 | 30 | ## Deploy on Vercel 31 | 32 | 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. 33 | 34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 35 | -------------------------------------------------------------------------------- /app/(auth)/layout.jsx: -------------------------------------------------------------------------------- 1 | import '../(site)/globals.css' 2 | 3 | import Link from 'next/link' 4 | import Provider from '../(site)/provider' 5 | import { ChevronLeftIcon } from '@heroicons/react/24/outline' 6 | 7 | export default function AuthLayout({ children }) { 8 | return ( 9 | 10 | 11 | 12 | 13 |
14 |
15 | 19 | 20 | Home 21 | 22 |
23 |

24 | Sign in to your account 25 |

26 |
27 |
28 | {children} 29 |
30 |
31 |
32 |
33 | 34 | 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /app/(auth)/signin/page.jsx: -------------------------------------------------------------------------------- 1 | import Button from 'app/components/ui/button' 2 | import TextField from 'app/components/form/TextField' 3 | import GoogleLoginButton from 'app/components/auth/GoogleSignInButton' 4 | 5 | const SignInPage = () => { 6 | return ( 7 | <> 8 |
9 |
10 | 19 |
20 | 28 |
29 |
30 | or 31 |
32 | 33 | 34 | ) 35 | } 36 | 37 | export default SignInPage 38 | -------------------------------------------------------------------------------- /app/(auth)/signout/page.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const SignOut = () => { 4 | return
SignOut
5 | } 6 | 7 | export default SignOut 8 | -------------------------------------------------------------------------------- /app/(site)/footer.jsx: -------------------------------------------------------------------------------- 1 | const Footer = () => { 2 | return ( 3 | 8 | ) 9 | } 10 | 11 | export default Footer 12 | -------------------------------------------------------------------------------- /app/(site)/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | #__next { 7 | @apply contents; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/(site)/head.jsx: -------------------------------------------------------------------------------- 1 | export default function Head() { 2 | return ( 3 | <> 4 | Create Next App 5 | 6 | 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /app/(site)/header.jsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import Link from 'next/link' 4 | import LoginButton from '../components/auth/SignInButton' 5 | 6 | const Header = () => { 7 | return ( 8 |
9 | 24 |
25 | ) 26 | } 27 | 28 | export default Header 29 | -------------------------------------------------------------------------------- /app/(site)/layout.jsx: -------------------------------------------------------------------------------- 1 | import './globals.css' 2 | import Footer from './footer' 3 | import Header from './header' 4 | import Provider from './provider' 5 | 6 | export default function RootLayout({ children }) { 7 | return ( 8 | 9 | 10 | 11 | 12 |
13 |
{children}
14 |