swarooppatilx / scruter

Scruter is a local classifieds and community site designed to bring people together for buying, selling, and exchanging goods and services.
https://scruter.vercel.app
GNU General Public License v3.0
28 stars 135 forks source link

Added seeding of DB, now new contributors can run npx prisma db seed and their db will be seeded with sample data to work with #472

Closed ShivanshPlays closed 2 weeks ago

ShivanshPlays commented 2 weeks ago

Seeding Database with Initial Listings

Overview

This seeding file, seeding.ts, is designed to populate the database with initial data. The file will create a dummy seller and six listings, with two listings for each category (Housing, For Sale, and Fooding). Images for each listing will be sourced from the public folder, and linked to the created listings in the database.

This seed data provides users with a quick way to see the platform in action, even if the database is initially empty.

Purpose of the Seeding File

When a user sets up the project for the first time, the database is usually empty, which makes it challenging to explore or test the application's features. Seeding the database with sample listings allows users to:

closes #471

vercel[bot] commented 2 weeks ago

@ShivanshPlays is attempting to deploy a commit to the Piyush's projects Team on Vercel.

A member of the Team first needs to authorize it.

ShivanshPlays commented 2 weeks ago

Screenshots

This data is generated by seeding my own database after running npx prisma db push

https://github.com/user-attachments/assets/7048909a-d254-487f-a37e-8f8e15dda43b

swarooppatilx commented 2 weeks ago

Screenshots

This data is generated by seeding my own database after running npx prisma db push Screen.Recording.2024-11-06.050318.mp4

@Ashish-kharde1 LOL