A modern Next.js website for Herman's Modern Bakery, featuring the latest technologies including WorkOS AuthKit, Convex, and Tailwind CSS.
- 🍰 Modern Design: Beautiful, responsive design with Tailwind CSS
- 🔐 Authentication: Secure authentication with WorkOS AuthKit
- 📱 Responsive: Mobile-first design that works on all devices
- 🗺️ Interactive Map: Google Maps integration for location
- 🎠 Carousel: Interactive menu carousel with auto-slide
- 🖼️ Gallery: Photo gallery showcasing the bakery
- ⚡ Fast: Built with Next.js 15 and optimized for performance
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS
- Authentication: WorkOS AuthKit
- Database: Convex (ready for integration)
- Icons: Lucide React
- TypeScript: Full type safety
- Node.js 18+
- npm or yarn
- WorkOS account
- Convex account (optional)
-
Clone the repository
git clone <repository-url> cd hermans-nextjs
-
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:# WorkOS AuthKit Configuration WORKOS_API_KEY='your_workos_api_key_here' WORKOS_CLIENT_ID='your_workos_client_id_here' WORKOS_COOKIE_PASSWORD="generate_a_secure_password_here_at_least_32_characters_long" # Configured in the WorkOS dashboard NEXT_PUBLIC_WORKOS_REDIRECT_URI="http://localhost:3000/callback" # Convex Configuration (optional) # CONVEX_DEPLOY_KEY="your_convex_deploy_key_here" # NEXT_PUBLIC_CONVEX_URL="your_convex_url_here"
-
Set up WorkOS AuthKit
- Sign up for a WorkOS account
- Create a new project in the WorkOS dashboard
- Enable AuthKit in your project
- Configure the redirect URI:
http://localhost:3000/callback - Copy your API key and Client ID to the environment variables
-
Generate a secure cookie password
openssl rand -base64 32
Copy the output to
WORKOS_COOKIE_PASSWORDin your.env.localfile. -
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
hermans-nextjs/
├── src/
│ ├── app/
│ │ ├── callback/ # AuthKit callback route
│ │ ├── login/ # AuthKit login route
│ │ ├── globals.css # Global styles
│ │ ├── layout.tsx # Root layout with AuthKit provider
│ │ └── page.tsx # Home page
│ ├── components/
│ │ ├── Navbar.tsx # Navigation component
│ │ ├── Header.tsx # Hero section
│ │ ├── FoodItems.tsx # Menu section
│ │ ├── Carousel.tsx # Menu carousel
│ │ ├── Gallery.tsx # Photo gallery
│ │ ├── Map.tsx # Location map
│ │ └── Footer.tsx # Footer component
│ └── data/
│ └── cafe.json # Menu data
├── public/
│ └── assets/ # Images and static assets
├── middleware.ts # AuthKit middleware
└── tailwind.config.ts # Tailwind configuration
This project uses WorkOS AuthKit for authentication:
- Sign In: Users visit
/loginto be redirected to WorkOS AuthKit - Callback: After authentication, users are redirected to
/callback - Session Management: AuthKit handles session management automatically
- Protected Routes: Use the
withAuthfunction to protect routes
import { withAuth } from '@workos-inc/authkit-nextjs';
export default async function ProtectedPage() {
const { user } = await withAuth({ ensureSignedIn: true });
return (
<div>
<h1>Welcome, {user.firstName}!</h1>
</div>
);
}The project uses a custom color palette defined in tailwind.config.ts:
- Background:
#FCF4E0(cream) - Brand:
#f11a23(red) - Primary:
#f91944(pink-red)
The project uses custom fonts:
- Poppins: Main body text
- Dela Gothic One: Headings and branding
- Caveat: Decorative text
Update the menu items in src/data/cafe.json to customize the weekly specials.
- Push your code to GitHub
- Connect your repository to Vercel
- Add your environment variables in the Vercel dashboard
- Deploy!
The project can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support with:
- WorkOS AuthKit: WorkOS Documentation
- Next.js: Next.js Documentation
- Tailwind CSS: Tailwind Documentation
- Convex: Convex Documentation
Built with ❤️ for Herman's Modern Bakery