https://github.com/ECarry/photography-website
An open-source Photo BlogπΈπ built using Next.js 14, Drizzle, postgresql, Auth.js V5, Shadcn/ui and Hono.js.
https://github.com/ECarry/photography-website
authjs drizzle-orm honojs nextjs14 postgresql shadcn-ui
Last synced: 5 days ago
JSON representation
An open-source Photo BlogπΈπ built using Next.js 14, Drizzle, postgresql, Auth.js V5, Shadcn/ui and Hono.js.
- Host: GitHub
- URL: https://github.com/ECarry/photography-website
- Owner: ECarry
- Created: 2023-09-25T06:35:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-11T16:10:00.000Z (6 months ago)
- Last Synced: 2024-11-14T17:04:42.259Z (6 months ago)
- Topics: authjs, drizzle-orm, honojs, nextjs14, postgresql, shadcn-ui
- Language: TypeScript
- Homepage: https://p.ecarry.me
- Size: 46.4 MB
- Stars: 77
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Photography Blog πΈ
[](https://vercel.com/new/clone?repository-url=https://github.com/ECarry/photography-website)
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
![]()
![]()
![]()
![]()
## π Support Theme
- π Dark
- π Light
## π οΈ Tech Stack
- **Framework:** [Next.js 15](https://nextjs.org/)
- **Database:** [Neon](https://neon.tech/) (Serverless Postgres)
- **ORM:** [Drizzle](https://orm.drizzle.team/)
- **Authentication:** [Better Auth](https://better-auth.com/)
- **UI Components:** [Shadcn/ui](https://ui.shadcn.com/)
- **API Layer:** [tRPC](https://trpc.io/)
- **Storage:** [Cloudflare R2](https://www.cloudflare.com/products/r2/)
- **Deployment:** [Vercel](https://vercel.com)## π Getting Started
### Prerequisites
- Node.js 20+
- bun (recommended) or npm
- Neon Database
- Cloudflare R2 Account### Environment Variables
Create a `.env.local` file in the root directory:
```bash
# Database
DATABASE_URL=your_neon_database_url# Auth
BETTER_AUTH_SECRET=
BETTER_AUTH_URL=http://localhost:3000 #Base URL of your appNEXT_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:
```bash
git clone https://github.com/your-username/photography-website.git
cd photography-website
```2. Install dependencies:
```bash
bun install
```3. Set up the database:
```bash
bun db:push
```4. Start the development server:
```bash
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`:
```typescript
// 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](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
[](https://star-history.com/#ECarry/photography-website&Date)
## π Changelog
- 2025-02-13: tRPC instead of Hono.js
- 2025-01-12: Better Auth instead of Next Auth## πββοΈ Todo
- [x] Home page with tRPC
- [x] Discover page with tRPC
- [x] Dashboard photos & photo id page with tRPC
- [ ] Blog page with tRPC
- [x] Travel page with tRPC