Skip to content

nahidprince7/koshai-lagbe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

কসাই লাগবে

কসাই লাগবে is a Bengali-first Qurbani butcher directory and registration platform for Bangladesh. Users can search for registered butchers by location, while butchers can register and maintain their profile information.

The Laravel application lives inside the src/ directory. Docker, nginx, PHP, and PostgreSQL setup files live at the repository root.

Features

  • Bengali-first landing page and user interface
  • Searchable butcher directory
  • District and area-based filtering
  • Combined login and registration flow
  • Butcher profile fields such as price, team size, district, and address
  • Auth-protected phone number reveal flow
  • Static support pages such as about, privacy policy, and registration rules

Tech Stack

  • Laravel 13
  • PHP 8.3
  • PostgreSQL
  • Inertia.js
  • React 19
  • Vite 8
  • Tailwind CSS 4
  • Docker and Docker Compose

Quick Start With Docker

This is the recommended way to run the project locally because Docker provides PHP, PostgreSQL, nginx, Redis, Composer, and Node inside containers.

Requirements

  • Git
  • Docker
  • Docker Compose

1. Clone the Repository

git clone git@github.com:nahidprince7/koshai-lagbe.git
cd koshai-lagbe

If you prefer HTTPS:

git clone https://github.com/nahidprince7/koshai-lagbe.git
cd koshai-lagbe

First-Time Setup Commands

After cloning, you can run the full Docker setup with:

cp .env.docker .env
cp src/.env.example src/.env
docker compose up -d --build
docker compose exec app composer install
docker compose exec app npm install
docker compose exec app php artisan key:generate
docker compose exec app php artisan migrate --seed
docker compose restart app

Then open http://localhost:8000.

2. Create Environment Files

Create the root Docker environment file:

cp .env.docker .env

Create the Laravel environment file:

cp src/.env.example src/.env

The default Docker values are already configured for PostgreSQL:

DB_CONNECTION=pgsql
DB_HOST=db
DB_PORT=5432
DB_DATABASE=koshai_lagbe_db
DB_USERNAME=koshai_lagbe_user
DB_PASSWORD=secret123

3. Build and Start Containers

docker compose up -d --build

4. Install Backend Dependencies

docker compose exec app composer install

5. Install Frontend Dependencies

docker compose exec app npm install

6. Generate App Key

docker compose exec app php artisan key:generate

7. Run Database Migrations and Seeders

docker compose exec app php artisan migrate --seed

8. Open the App

Visit:

http://localhost:8000

The Vite dev server is exposed at:

http://localhost:5173

In normal Docker development, open the app through http://localhost:8000.

Useful Docker Commands

Start containers:

docker compose up -d

Stop containers:

docker compose down

View logs:

docker compose logs -f

Run Artisan commands:

docker compose exec app php artisan route:list

Run tests:

docker compose exec app composer test

Build frontend assets:

docker compose exec app npm run build

Reset and reseed the database:

docker compose exec app php artisan migrate:fresh --seed

Manual Local Setup Without Docker

Use this path only if you want to run PHP, Node, and PostgreSQL directly on your machine.

Requirements

  • PHP 8.3+
  • Composer
  • Node.js and npm
  • PostgreSQL

1. Install Dependencies

cd src
composer install
npm install

2. Configure Environment

cp .env.example .env
php artisan key:generate

Update these values in src/.env for your local PostgreSQL database:

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=koshai_lagbe_db
DB_USERNAME=your_postgres_user
DB_PASSWORD=your_postgres_password

Create the database in PostgreSQL before running migrations.

3. Run Migrations and Seeders

php artisan migrate --seed

4. Start the Development Servers

composer run dev

Laravel will run on its local development URL, and Vite will run alongside it.

Project Structure

koshai-lagbe/
├── docker/              # Docker, nginx, PHP, supervisor config
├── docker-compose.yml   # Local Docker services
├── src/                 # Laravel application root
│   ├── app/             # Controllers, middleware, models
│   ├── database/        # Migrations and seeders
│   ├── resources/js/    # Inertia React pages and components
│   ├── resources/css/   # Tailwind entry file
│   ├── routes/          # Web and API routes
│   └── public/          # Public Laravel assets
└── README.md

Main Routes

  • / - landing page
  • /directory - butcher directory
  • /auth - login and registration
  • /about - about page
  • /privacy-policy - privacy policy
  • /registration-rules - registration rules
  • /dashboard - authenticated dashboard

Development Notes

  • Edit Laravel, React, and Tailwind source files inside src/.
  • Do not edit generated files in src/public/build/ directly.
  • Directory search uses PostgreSQL-specific ilike, so PostgreSQL is recommended for local development.
  • The app uses Laravel session authentication for web routes.
  • Butcher phone numbers should stay protected for guest users.

Troubleshooting

If the app container starts before dependencies are installed, run:

docker compose exec app composer install
docker compose exec app npm install
docker compose restart app

If Laravel reports a missing app key:

docker compose exec app php artisan key:generate

If the database connection fails, confirm that the root .env, src/.env, and docker-compose.yml database values match.

If frontend assets are missing or stale:

docker compose exec app npm run build

License

This project is open-sourced under the MIT license unless stated otherwise.

About

কসাই লাগবে ?? — পবিত্র ঈদুল আযহা ২০২৬ উপলক্ষে কুরবানি দাতা ও দক্ষ কসাইদের সংযোগকারী একটি আধুনিক প্ল্যাটফর্ম। এটি Laravel, Inertia.js এবং React দিয়ে তৈরি। এতে রয়েছে রিয়েল-টাইম কসাই ডিরেক্টরি, উন্নত সার্চ ফিল্টার এবং কাস্টম প্রোফাইল ম্যানেজমেন্ট সুবিধা। উৎসবের প্রস্তুতিকে সহজ ও ঝামেলামুক্ত করতে একটি প্রিমিয়াম ডিজিটাল সমাধান।

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors