airbnb-for-stuff Svelte Themes

Airbnb For Stuff

A peer-to-peer item rental platform, built with Svelte, Go's gorilla/mux, and PostgreSQL β€” like AirBnB, but for everyday items.

AirBnb For Stuff πŸ“¦

Our application is a social platform that connects item owners (lenders) with renters, enabling peer-to-peer rental of personal belongingsβ€”like Airbnb, but for everyday items. Users can log in to browse a wide range of available items, rent what they need, and complete payments directly through the app. Owners can list items they'd like to lend and also rent from others, creating a flexible, two-way marketplace.

Docs: Google Docs

Built with Svelte, GO, PostgresSQL.

App Structure 🧱

β”œβ”€β”€ backend
β”‚   β”œβ”€β”€ main.go
|   β”œβ”€β”€ go.mod
|   β”œβ”€β”€ go.sum
|   β”œβ”€β”€ .env
β”‚   β”œβ”€β”€ db                  // for DB connections
β”‚   β”‚   β”œβ”€β”€ db.go.go
β”‚   β”‚   β”œβ”€β”€ queries.sql
β”‚   β”‚   β”œβ”€β”€ schema.sql      // DB schema
β”‚   β”œβ”€β”€ handlers          // API core handlers
β”‚   β”‚   β”œβ”€β”€ handlers.go
|   β”œβ”€β”€ middleware          // auth, CORS
β”‚   β”‚   β”œβ”€β”€ auth.go
β”‚   β”‚   β”œβ”€β”€ cors.go
β”‚   └── models
β”‚   |    └── model_functions.go     // DB functions
β”‚   |    └── ...                    // Models for our application
|   |
β”œβ”€β”€ frontend    //svelte app
β”œβ”€β”€ data    // mock data generation
└── backup  // application's data

Run Svelte ⚑️

cd frontend
npm i # install dependencies
npm run dev 
npm run build # production build
npm run preview # preview production build

Check localhost:5173/

Run GO πŸ’»

Create a .env file in /backend:

POSTGRES_URL=postgres://<username>:<password>@<host>:<port>/<dbname>?sslmode=require

Run the program

cd backend
go mod tidy # install dependencies
go run main.go 

Check localhost:8080/

Generate mock data πŸ“Š

cd data
python -m venv venv 
source venv/bin/activate # activate virtual env
pip install -r requirements.txt
python script.py

Mock data should be generated in /fake_data_csv

Backup data are stored in data/ πŸ’Ώ

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes