Skip to content

Arash-abraham/File-Store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š FileStore - Digital PDF Book Marketplace

Laravel JavaScript Tailwind CSS MySQL

A modern digital marketplace for PDF books built with Laravel. Purchase, download, and manage your digital books seamlessly.

✨ Features

🏠 Frontend Features

  • Home Page with customer satisfaction highlights
  • Dynamic Admin-configurable menus (Home, Products, FAQ, About Us)
  • 8 Best-selling products showcase
  • Categories section with product counts
  • Advanced search functionality across products
  • Footer with site information

πŸ‘€ User Features

  • Shopping Cart (requires authentication)
  • Duplicate purchase prevention for owned products
  • Discount code system
  • Wallet system with partial payments
  • User Dashboard with:
    • Order history
    • Purchased file downloads
    • Ticket submission
    • Profile management
    • Password change
    • Wallet recharge

⚑ Admin Panel

  • Dashboard with:
    • Sales analytics
    • Revenue tracking
    • Sales charts
  • Management Sections:
    • Products management
    • File management
    • Categories
    • Tags
    • Discount codes
    • Comments moderation
    • Menu settings
    • Payments
    • Tickets
    • FAQ management

πŸ” Authentication System

  • Three Login Methods:
    • Email & Password
    • 6-digit code via Email
    • 6-digit code via SMS

πŸ’³ Payment Gateway

  • ZarinPal integration for secure payments

πŸ“§ Notifications

  • Automated purchase confirmation emails

πŸš€ Quick Start

Prerequisites

  • PHP 8.0+
  • Composer
  • MySQL 5.7+
  • Node.js & NPM

Installation

  1. Clone the repository
git clone https://github.com/yourusername/filestore.git
cd filestore
  1. Install PHP dependencies
composer install
  1. Install Node.js dependencies
npm install
  1. Build frontend assets
npm run build
  1. Environment Setup
cp .env.example .env
  1. Configure Environment Variables Edit .env file with your configuration:
# Basic App Configuration
APP_NAME=FileStore
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8000

# Database Configuration
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=filestore
DB_USERNAME=your_username
DB_PASSWORD=your_password

# Email Configuration (Must be configured by user)
MAIL_MAILER=smtp
MAIL_HOST=your_smtp_host
MAIL_PORT=your_smtp_port
MAIL_USERNAME=your_smtp_username
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="FileStore"

# SMS Configuration (Kaveh Negar)
KAVEHNEGAR_API_KEY=your_kavehnegar_api_key
KAVEHNEGAR_SENDER=your_sender_number

# Payment Gateway (ZarinPal)
ZARINPAL_MERCHANT_ID=your_zarinpal_merchant_id
ZARINPAL_SANDBOX=true

# File Upload Configuration
FILESYSTEM_DISK=public
MAX_FILE_SIZE=30720
ALLOWED_FILE_TYPES=pdf
  1. Generate application key
php artisan key:generate
  1. Run database setup
php artisan migrate --seed
  1. Create storage link
php artisan storage:link
  1. Start development server
composer run dev

πŸ“Έ Screenshots

Home Page

Main landing page with customer satisfaction section, best-selling products, and categories

Products Page

Product catalog with advanced search and category filtering

Category View

Category page showing product count and filtered results

User Dashboard

User panel => wallet management

Admin Panel

Administrative dashboard with analytics and management sections

Shopping Cart

Shopping cart with discount codes and wallet integration

πŸ—ƒοΈ Database Structure

Main Tables

  • users - User accounts and profiles
  • products - PDF book products
  • categories - Product categories
  • orders - Purchase records
  • order_items - Individual order items
  • wallets - User wallet balances
  • discount_codes - Promotional codes
  • tickets - Support tickets
  • faqs - Frequently asked questions
  • menus - Dynamic menu management
  • payments - Payment transactions
  • comments - User comments and reviews

πŸ”§ Configuration

Email Setup

You must configure your email service in .env:

MAIL_MAILER=smtp
MAIL_HOST=your_smtp_host
MAIL_PORT=your_smtp_port
MAIL_USERNAME=your_smtp_username
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=tls

SMS Setup (Kaveh Negar)

  1. Register at Kaveh Negar
  2. Get your API key from dashboard
  3. Configure in .env:
KAVEHNEGAR_API_KEY=your_api_key_here
KAVEHNEGAR_SENDER=your_sender_number

Payment Gateway (ZarinPal)

  1. Register at ZarinPal
  2. Get your Merchant ID
  3. Configure in .env:
ZARINPAL_MERCHANT_ID=your_zarinpal_merchant_id

File Upload Configuration

Admins can upload files up to 30MB:

MAX_FILE_SIZE=30720
ALLOWED_FILE_TYPES=pdf

πŸš€ Deployment

Production Deployment Steps:

  1. Environment Setup
cp .env.example .env
# Update production values in .env
  1. Optimize Application
php artisan config:cache
php artisan route:cache
php artisan view:cache
  1. Set proper permissions
chmod -R 755 storage
chmod -R 755 bootstrap/cache

πŸ› Troubleshooting

Common Issues:

File upload fails:

  • Check upload_max_filesize in php.ini (should be at least 30M)
  • Verify storage permissions
  • Ensure allowed file types in config

Email not sending:

  • Verify SMTP credentials in .env
  • Check spam folder
  • Test with Mailtrap first

SMS not working:

  • Verify Kaveh Negar API key
  • Check account balance
  • Validate sender number

Payment issues:

  • Verify ZarinPal Merchant ID
  • Check callback URLs
  • Ensure SSL certificate for production

Login issues:

  • Check email/SMS configuration
  • Verify database connections
  • Check session configuration

πŸ‘₯ Authors

Arash Ebrahimian Amir Hossein Hosseinzade
Lead Developer & Project Architect Co-developer & Template Specialist
GitHub GitHub

πŸ™ Acknowledgments

  • Kaveh Negar for SMS service
  • ZarinPal for payment gateway

πŸ“ž Support

For support, email [email protected] .


Made with ❀️ using Laravel & JavaScript and Tailwind CSS

About

A small store for buying books in pdf format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •