Code Practice: How to create Simple Portfolio with CMS — Full-stack, Next.js, Tailwind CSS, Flowbite, Supabase
Create portfolio with content management system following a single article.
Complete Step-by-step Tutorial
Live demo on Vercel
Series:
Stack:
Some concepts you’ll see here
- Next.js App Router
- Next.js server and client components
- PostgreSQL database functions, policies, and trigger.
- Supabase database and storage CRUD.
Notes
- Components and icons used in this project are from Flowbite.
- Authentication page navigation buttons are not included in Sidebar.tsx since the auth is only exclusive to owner of the web portfolio. User must manually visit
/sign-up
and/sign-in
page via the address bar. - This project also only allows whitelisted emails to sign up and sign in to the app and acquire admin privileges such as adding and editing projects. Check
app/auth/sign-in/route.ts
andapp/auth/sign-up/route.ts
.
Preview
Before you begin, ensure you have the following software installed:
- GitHub CLI
- Node.js 16.8 or later.
- macOS, Windows (including WSL), and Linux are supported.
- Docker Desktop
- Prettier VS Code Extension
- Tailwind Fold (Optional)
- Create your GitHub repo using this project as template.
gh repo create <repo-name> --public --template=saikise/simple-portfolio-with-cms-cwntfs
- Install the dependencies listed in
package.json
.
npm i
To run the project, use the following command:
- Log in to Supabaes CLI
npx supabase login
- Start Supabase services.
Requires supabase/config.toml
to be created in your current working directory by running npx supabase init
but Supabase local config is already set up in this repo via npx supabase init
so we can directly just start Supabase services with the command below:
npx supabase start
- Start development server.
npm run dev