Skip to content

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

Notifications You must be signed in to change notification settings

LuaanNguyen/airbnb-for-stuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirBnb For Stuff

Built with Svelte, GO, PostgresSQL.

This project is an simple marketplace that allows users to rent out various personal items.

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 app

cd frontend
npm i
npm run dev
npm run build
npm run preview

Check localhost:5173/

Run GO app

Create a .env file in /backend with:

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

Run the program

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

Check localhost:8080/

Generate mock data

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

Mock data should be generated in /fake_data_csv

💿 Backup data are stored in data/

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published