Skip to content

RobertTGreat/vile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Repacked - Modern Marketplace

A beautiful, modern resale marketplace built with Next.js, Supabase, and a stunning frosted glass UI design.

Features

  • 🎨 Frosted Glass UI: Beautiful semi-transparent glass morphism design
  • πŸ” Authentication: Secure user authentication with Supabase Auth
  • πŸ“ Post Creation: Create and manage resale posts with rich metadata
  • 🏷️ Tagging System: Organize posts with customizable tags
  • πŸ” Search & Filter: Advanced search and filtering capabilities
  • πŸ›’ Shopping Cart: Add items to basket and manage purchases
  • πŸ‘€ User Management: My Posts page for managing your listings
  • πŸ“± Responsive Design: Works perfectly on all devices
  • ⚑ Real-time Updates: Live data synchronization with Supabase

Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript
  • Styling: Tailwind CSS with custom frosted glass components
  • Backend: Supabase (Database, Auth, Real-time)
  • Icons: Lucide React
  • Deployment: Vercel (recommended)

Getting Started

Prerequisites

  • Node.js 18+
  • npm, pnpm or bun
  • Supabase account

1. Clone and Install

git clone <your-repo-url>
cd repacked
npm install

2. Environment Setup

IMPORTANT: Create a .env file in the root directory and paste the environment variables that were shared in Discord. This file contains your Supabase credentials and should never be committed to version control.

# Create the environment file
Create .env
or
touch .env

Then paste the environment variables from the Discord message into this file.

3. Set up Database

The database schema is already configured. The project includes:

  • profiles table for user profiles
  • posts table for resale posts
  • tags table for post tags
  • post_tags junction table
  • storage.buckets for image uploads
  • Row Level Security policies
  • Triggers for user signup

4. Configure Authentication

Authentication is already configured, but you may need to update the site URL in your Supabase dashboard:

  1. Go to Authentication > Settings
  2. Add your domain to "Site URL" (e.g., http://localhost:3000 for development)
  3. Add redirect URLs for authentication if needed

5. Run the Development Server

npm run dev

Open http://localhost:3000 to see your app.

Project Structure

src/
β”œβ”€β”€ app/                    # Next.js app directory
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   └── upload/       # Image upload endpoints
β”‚   β”œβ”€β”€ my-posts/         # User's posts management page
β”‚   β”œβ”€β”€ post/[id]/        # Individual post page
β”‚   β”œβ”€β”€ search/           # Search page
β”‚   β”œβ”€β”€ globals.css       # Global styles with frosted glass theme
β”‚   β”œβ”€β”€ layout.tsx        # Root layout
β”‚   └── page.tsx          # Home page
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ auth/             # Authentication components
β”‚   β”‚   β”œβ”€β”€ AuthModal.tsx # Sign in/up modal
β”‚   β”‚   └── UserMenu.tsx  # User dropdown menu
β”‚   β”œβ”€β”€ basket/           # Shopping cart components
β”‚   β”‚   └── BasketModal.tsx # Cart modal
β”‚   β”œβ”€β”€ layout/           # Layout components
β”‚   β”‚   └── Header.tsx    # Main header
β”‚   β”œβ”€β”€ posts/            # Post-related components
β”‚   β”‚   β”œβ”€β”€ CreatePostModal.tsx # Post creation form
β”‚   β”‚   β”œβ”€β”€ EditPostModal.tsx   # Post editing modal
β”‚   β”‚   β”œβ”€β”€ PostCard.tsx        # Individual post display
β”‚   β”‚   β”œβ”€β”€ PostList.tsx        # Posts listing with search/filter
β”‚   β”‚   └── SearchPostList.tsx  # Search results
β”‚   β”œβ”€β”€ providers/        # Context providers
β”‚   └── ui/               # Reusable UI components
β”‚       β”œβ”€β”€ GlassButton.tsx    # Frosted glass button
β”‚       β”œβ”€β”€ GlassCard.tsx      # Frosted glass card
β”‚       β”œβ”€β”€ GlassInput.tsx     # Frosted glass input
β”‚       β”œβ”€β”€ GlassTextarea.tsx  # Frosted glass textarea
β”‚       β”œβ”€β”€ ImageUpload.tsx    # Image upload component
β”‚       └── ThemeSelector.tsx   # Theme switcher
β”œβ”€β”€ contexts/             # React contexts
β”‚   β”œβ”€β”€ BasketContext.tsx     # Shopping cart state
β”‚   β”œβ”€β”€ SearchContext.tsx     # Search state
β”‚   └── ThemeContext.tsx      # Theme state
└── lib/                  # Utility libraries
    β”œβ”€β”€ supabase.ts           # Supabase client
    β”œβ”€β”€ supabase-client.ts    # Browser client
    β”œβ”€β”€ supabase-server.ts    # Server client
    └── supabase-storage.ts   # Storage utilities

Key Features Explained

Frosted Glass Design

The app uses a custom frosted glass design system with:

  • Semi-transparent backgrounds with backdrop blur
  • Subtle borders and shadows
  • Smooth hover animations
  • Consistent color scheme

Authentication Flow

  1. Users can sign up with email/password
  2. Profile is automatically created on signup
  3. User menu provides access to account features
  4. Secure session management with Supabase

Post Management

  • Rich post creation with title, description, price, condition, location
  • Tagging system with predefined categories
  • Image upload and management with Supabase Storage
  • Edit and delete posts from "My Posts" page
  • Search and filtering capabilities
  • Real-time updates
  • Shopping cart functionality

Database Schema

The database includes:

  • User profiles with username and full name
  • Posts with comprehensive metadata (title, description, price, condition, category, location, images)
  • Tags with custom colors
  • Many-to-many relationship between posts and tags
  • Supabase Storage bucket for image uploads
  • Row Level Security for data protection
  • Shopping cart functionality (client-side state)

Customization

Adding New Tags

Tags are managed in the database. You can add new tags by inserting into the tags table:

INSERT INTO tags (name, color) VALUES ('New Category', '#FF6B6B');

Styling Customization

The frosted glass effect can be customized in src/app/globals.css:

/* Adjust blur intensity */
backdrop-blur-md /* or backdrop-blur-sm, backdrop-blur-lg */

/* Adjust transparency */
bg-white/10 /* 10% opacity */
bg-white/20 /* 20% opacity */

Adding New Post Fields

  1. Update the database schema in Supabase dashboard
  2. Modify the CreatePostModal.tsx and EditPostModal.tsx components
  3. Update the PostCard.tsx display component
  4. Adjust the PostList.tsx query
  5. Update TypeScript interfaces

Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add environment variables in Vercel dashboard:
    • NEXT_PUBLIC_SUPABASE_URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY
  4. Deploy!

Other Platforms

The app can be deployed to any platform that supports Next.js:

  • Netlify
  • Railway
  • DigitalOcean App Platform
  • AWS Amplify

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

MIT License - feel free to use this project for your own marketplace!

Support

If you encounter any issues:

  1. Check your .env file - Make sure you've created it with the environment variables from Discord
  2. Check the Supabase dashboard for database/auth issues
  3. Verify your environment variables are correct
  4. Check the browser console for errors
  5. Open an issue on GitHub

Quick Start Checklist

  • Clone the repository
  • Run npm install
  • Create .env file with environment variables from Discord
  • Run npm run dev
  • Open http://localhost:3000
  • Sign up for an account
  • Create your first post!

Built with ❀️ using Next.js and Supabase

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages