Skip to content

An open-source Photograph travel Blog๐Ÿ“ธ built using Next.js, Drizzle, Neon, Better auth, Shadcn/ui and tRPC.

License

ECarry/photography-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Photography Blog ๐Ÿ“ธ

Deploy with Vercel

A modern, open-source photography blog platform built with the latest web technologies. Share your photography journey with style and efficiency.

โœจ Features

  • ๐Ÿ“ฑ Responsive design for all devices
  • ๐Ÿ–ผ๏ธ Automatic EXIF data extraction from photos
  • ๐Ÿ” Secure authentication with Better Auth
  • โ˜๏ธ Cloud storage with Cloudflare R2
  • ๐ŸŽจ Beautiful UI with Shadcn/ui components
  • ๐Ÿš€ Lightning-fast performance
  • ๐Ÿ“ Location-based photo organization
  • ๐ŸŒ SEO optimized
  • ๐ŸŽฏ API powered by tRPC

๐Ÿ“ธ Screenshots

page

page

page

page

page

๐ŸŒˆ Support Theme

  • ๐ŸŒˆ Dark
  • ๐ŸŒˆ Light

page

๐Ÿ› ๏ธ Tech Stack

๐Ÿš€ Getting Started

Prerequisites

Environment Variables

Create a .env file in the root directory:

# Database
DATABASE_URL=your_database_url

# Auth
# You can generate a random secret using `openssl rand -base64 32`
BETTER_AUTH_SECRET=
BETTER_AUTH_URL=http://localhost:3000 #Base URL of your app

NEXT_PUBLIC_APP_URL='http://localhost:3000'

# Cloudflare R2
CLOUDFLARE_R2_ENDPOINT=
CLOUDFLARE_R2_ACCESS_KEY_ID=
CLOUDFLARE_R2_SECRET_ACCESS_KEY=
CLOUDFLARE_R2_BUCKET_NAME=
CLOUDFLARE_R2_PUBLIC_URL=

# Mapbox
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=

Replace your-domain.com with your actual domain name. This is required for Cloudflare Image Optimization to work correctly.

Installation

  1. Clone the repository:
git clone https://github.com/your-username/photography-website.git
cd photography-website
  1. Install dependencies:
bun install
  1. Set up the database:
bun db:push
  1. Start the development server:
bun run dev

Initial User Registration

When you first deploy the application, you'll need to create an admin user. You can do this by visiting:

http://localhost:3000/sign-up

Note: After the first admin user is created, the /sign-up route will be disabled for security purposes. Any subsequent attempts to access the sign-up page will automatically redirect to the sign-in page (/sign-in).

Custom Domain Configuration

Before deploying, you need to update the custom domain in image-loader.ts:

// image-loader.ts
return `https://your-domain.com/cdn-cgi/image/${paramsString}/${normalizeSrc(
  src
)}`;

Visit http://localhost:3000 to see your application.

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿค Contributing

Contributions are welcome! Feel free to open issues and pull requests.

๐Ÿ’– Support

If you find this project helpful, please give it a โญ๏ธ on GitHub!

โญ๏ธ Star History

Star History Chart

๐Ÿ“ Changelog

  • 2025-02-13: tRPC instead of Hono.js
  • 2025-01-12: Better Auth instead of Next Auth

๐Ÿƒโ€โ™‚๏ธ Todo

  • Home page with tRPC
  • Discover page with tRPC
  • Dashboard photos & photo id page with tRPC
  • Blog page with tRPC
  • Travel page with tRPC

About

An open-source Photograph travel Blog๐Ÿ“ธ built using Next.js, Drizzle, Neon, Better auth, Shadcn/ui and tRPC.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •