first commit
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
# SecondTech Market
|
||||
|
||||
Marketplace barang bekas teknologi dengan frontend Vue dan backend Node.js Express.
|
||||
|
||||
## Stack
|
||||
|
||||
- Vue 3
|
||||
- Vite
|
||||
- Tailwind CSS
|
||||
- Vue Router
|
||||
- Express
|
||||
- MySQL
|
||||
- Multer untuk upload foto
|
||||
- JWT untuk sesi login
|
||||
|
||||
## Fitur
|
||||
|
||||
- Register dan login ke database
|
||||
- Password disimpan sebagai hash
|
||||
- Marketplace produk dari MySQL
|
||||
- Detail produk
|
||||
- Search produk
|
||||
- Filter kategori dan kondisi
|
||||
- Upload foto barang dari file perangkat
|
||||
- Dashboard barang saya
|
||||
- Tandai barang terjual
|
||||
- Hapus barang milik sendiri
|
||||
- Tombol WhatsApp penjual
|
||||
- Bookmark barang di browser
|
||||
|
||||
## Setup Database
|
||||
|
||||
1. Buka phpMyAdmin.
|
||||
2. Pilih menu Import.
|
||||
3. Import file `database.sql`.
|
||||
4. Pastikan database `secondtech_market` berhasil dibuat.
|
||||
|
||||
## Setup Environment
|
||||
|
||||
Copy `.env.example` menjadi `.env`, lalu sesuaikan koneksi MySQL:
|
||||
|
||||
```bash
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_USER=root
|
||||
DB_PASSWORD=
|
||||
DB_NAME=secondtech_market
|
||||
JWT_SECRET=ganti_dengan_secret_yang_panjang
|
||||
```
|
||||
|
||||
Jika frontend memakai port Vite default, biarkan:
|
||||
|
||||
```bash
|
||||
VITE_API_URL=http://localhost:5000
|
||||
CLIENT_URL=http://localhost:5173
|
||||
```
|
||||
|
||||
## Cara Menjalankan
|
||||
|
||||
Install dependency:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
Jalankan backend:
|
||||
|
||||
```bash
|
||||
npm run dev:api
|
||||
```
|
||||
|
||||
Jalankan frontend di terminal lain:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Buka:
|
||||
|
||||
```bash
|
||||
http://localhost:5173
|
||||
```
|
||||
|
||||
## Upload Foto
|
||||
|
||||
Foto yang diupload tersimpan di:
|
||||
|
||||
```bash
|
||||
server/uploads
|
||||
```
|
||||
|
||||
URL foto disimpan di MySQL sebagai path `/uploads/nama-file`.
|
||||
Reference in New Issue
Block a user