TODO:
TODO #1:
# Tailwindcss-animate
npm install tailwindcss-animate
# Tailwind-typography
npm install @tailwindcss/typography
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./sanity/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
screens: {
xs: "475px",
},
colors: {
primary: {
100: "FFE8F0",
DEFAULT: "#EE2B69",
},
secondary: "#FBE843",
black: {
100: "#333333",
200: "#141413",
300: "#7D8087",
DEFAULT: "#000000",
},
white: {
100: "#F7F7F7",
DEFAULT: "#FFFFFF",
},
background: "var(--background)",
foreground: "var(--foreground)",
},
},
fontFamily: {
"work-sans": "var(--font-work-sans)",
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
boxShadow: {
100: "2px 2px 0px 0px rgb(0, 0, 0)",
200: "2px 2px 0px 2px rgb(0, 0, 0)",
300: "2px 2px 0px 2px rgb(238, 43, 105)",
},
},
plugins: [require("@tailwindcss/typography"), require("tailwindcss-animate")],
};
Official site: Auth.jsx
npm install next-auth@beta
npx auth secret
touch auth.jsx
import NextAuth from "next-auth";
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [],
});
mkdir -p "app/api/auth/[...nextauth]"
touch "app/api/auth/[...nextauth]/route.jsx"
import { handlers } from "@/auth" // Referring to the auth.ts we just created
export const { GET, POST } = handlers
Authentication: OAuth
Setup with GitHub
- Add GitHub Client ID into .env.local
AUTH_GITHUB_ID="[CLIENT ID]"
- Add GitHub Secret ID into .env.local
AUTH_GITHUB_SECRET="[SECRET ID]"
import NextAuth from "next-auth";
import GitHub from "next-auth/providers/github";
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [GitHub],
});
# Create root 'app/(root)' folder
mkdir -p 'app/(root)'
# Move root `page.jsx` into app/(root) folder
mv 'app/page.jsx' 'app/(root)/'
# Create root layout file into app/(root)
touch 'app/(root)/layout.jsx'
# Create components folder
mkdir -p 'app/components'
# Create Navbar.jsx
touch 'app/components/Navbar.jsx'
JSMastery YC_Directory GitHub