Architect Your Digital Legacy. A curated arsenal of high-fidelity assets for the next generation of builders.
Shahriar Assets is a modern, high-performance digital asset marketplace built with the latest web technologies. It allows creators to sell digital products with a seamless user experience, from browsing to checkout and secure downloading.
Built with a focus on performance, type safety, and developer experience.
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS v4
- UI Components: Radix UI & Lucide React
- Database: PostgreSQL (via Neon)
- ORM: Drizzle ORM
- Authentication: Better Auth
- Payments: Stripe
- Storage: AWS S3 / Cloudflare R2
- State Management: Nuqs (URL-based state)
- 🛍️ Digital Storefront: Clean, responsive grid layout for showcasing digital products.
- 🔐 Secure Authentication: Robust user management using Better Auth.
- 💳 Payment Integration: Seamless checkout flow with Stripe.
- 📦 Admin Dashboard: Comprehensive tools to manage products, view orders, and handle functionality.
- ⬇️ Secure Downloads: Presigned URLs for secure file delivery.
- 🎨 Modern UI/UX: Glassmorphism effects, smooth animations, and dark mode support.
Follow these steps to set up the project locally.
- Node.js (v20+)
- pnpm (v9+)
- A PostgreSQL database (e.g., Neon)
- A Stripe account
- An S3-compatible storage bucket (e.g., Cloudflare R2)
-
Clone the repository:
git clone https://github.com/yourusername/binary-daydream.git cd binary-daydream -
Install dependencies:
pnpm install
-
Set up environment variables:
Create a
.envfile in the root directory and add the following:# Database DATABASE_URL="postgresql://..." # Authentication (Better Auth) BETTER_AUTH_SECRET="your_generated_secret" BETTER_AUTH_URL="http://localhost:3000" # Stripe STRIPE_SECRET_KEY="sk_test_..." STRIPE_WEBHOOK_SECRET="whsec_..." NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..." # Storage (R2/S3) R2_ACCOUNT_ID="your_account_id" R2_ACCESS_KEY_ID="your_access_key" R2_SECRET_ACCESS_KEY="your_secret_key" R2_BUCKET_NAME="your_bucket_name" # App NEXT_PUBLIC_APP_URL="http://localhost:3000"
-
Initialize the database:
Push the schema to your database:
pnpm db:push
-
Run the development server:
pnpm dev
Open http://localhost:3000 to view the app.
src/
├── app/ # Next.js App Router pages
│ ├── (admin)/ # Admin dashboard routes
│ ├── (auth)/ # Authentication routes (sign-in, etc.)
│ ├── (root)/ # Public storefront routes
│ └── api/ # API routes
├── components/ # Reusable UI components
│ ├── admin/ # Admin-specific components
│ ├── store/ # Store-specific components
│ └── ui/ # Base UI components (buttons, inputs, etc.)
├── db/ # Drizzle ORM schema and connection
├── lib/ # Utility functions, hooks, and configuration
│ ├── auth.ts # Authentication config
│ ├── stripe.ts # Stripe config
│ └── r2.ts # Storage config
└── hooks/ # Custom React hooks
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm type-check- Run TypeScript checkpnpm db:generate- Generate Drizzle migrationspnpm db:push- Push schema changes to database
This project is licensed under the MIT License - see the LICENSE file for details.
