added seed data; image uploads via server actions; infinite article grid

This commit is contained in:
2025-03-14 20:48:17 +01:00
parent 7135e34699
commit 37233db0ec
73 changed files with 4578 additions and 1137 deletions
+302
View File
@@ -0,0 +1,302 @@
[
{
"title": "Account Executive"
},
{
"title": "Engineer II"
},
{
"title": "Data Coordinator"
},
{
"title": "Senior Editor"
},
{
"title": "Senior Quality Engineer"
},
{
"title": "Statistician III"
},
{
"title": "Programmer I"
},
{
"title": "Office Assistant II"
},
{
"title": "VP Marketing"
},
{
"title": "Senior Quality Engineer"
},
{
"title": "Business Systems Development Analyst"
},
{
"title": "Chemical Engineer"
},
{
"title": "Director of Sales"
},
{
"title": "Chief Design Engineer"
},
{
"title": "Editor"
},
{
"title": "Speech Pathologist"
},
{
"title": "Pharmacist"
},
{
"title": "Operator"
},
{
"title": "Human Resources Assistant III"
},
{
"title": "Computer Systems Analyst II"
},
{
"title": "Sales Associate"
},
{
"title": "Desktop Support Technician"
},
{
"title": "Executive Secretary"
},
{
"title": "Quality Control Specialist"
},
{
"title": "Research Associate"
},
{
"title": "Software Consultant"
},
{
"title": "Staff Scientist"
},
{
"title": "Senior Sales Associate"
},
{
"title": "Business Systems Development Analyst"
},
{
"title": "VP Sales"
},
{
"title": "Mechanical Systems Engineer"
},
{
"title": "Information Systems Manager"
},
{
"title": "Internal Auditor"
},
{
"title": "Product Engineer"
},
{
"title": "Legal Assistant"
},
{
"title": "GIS Technical Architect"
},
{
"title": "Software Consultant"
},
{
"title": "Paralegal"
},
{
"title": "Nurse"
},
{
"title": "Biostatistician II"
},
{
"title": "Web Designer I"
},
{
"title": "Financial Analyst"
},
{
"title": "Administrative Officer"
},
{
"title": "VP Accounting"
},
{
"title": "Biostatistician IV"
},
{
"title": "Data Coordinator"
},
{
"title": "Occupational Therapist"
},
{
"title": "Web Developer IV"
},
{
"title": "Quality Control Specialist"
},
{
"title": "General Manager"
},
{
"title": "Assistant Manager"
},
{
"title": "Sales Associate"
},
{
"title": "VP Marketing"
},
{
"title": "Graphic Designer"
},
{
"title": "Operator"
},
{
"title": "Senior Financial Analyst"
},
{
"title": "Information Systems Manager"
},
{
"title": "Tax Accountant"
},
{
"title": "Research Assistant II"
},
{
"title": "Quality Engineer"
},
{
"title": "Staff Scientist"
},
{
"title": "Account Representative I"
},
{
"title": "Clinical Specialist"
},
{
"title": "Web Developer II"
},
{
"title": "Desktop Support Technician"
},
{
"title": "Electrical Engineer"
},
{
"title": "Registered Nurse"
},
{
"title": "Paralegal"
},
{
"title": "Financial Advisor"
},
{
"title": "Senior Cost Accountant"
},
{
"title": "Senior Financial Analyst"
},
{
"title": "Safety Technician III"
},
{
"title": "Recruiting Manager"
},
{
"title": "Engineer III"
},
{
"title": "Social Worker"
},
{
"title": "Assistant Manager"
},
{
"title": "Financial Analyst"
},
{
"title": "Health Coach II"
},
{
"title": "Database Administrator III"
},
{
"title": "Senior Editor"
},
{
"title": "Research Nurse"
},
{
"title": "Graphic Designer"
},
{
"title": "Quality Engineer"
},
{
"title": "Media Manager II"
},
{
"title": "Payment Adjustment Coordinator"
},
{
"title": "Desktop Support Technician"
},
{
"title": "Legal Assistant"
},
{
"title": "Research Associate"
},
{
"title": "Operator"
},
{
"title": "Speech Pathologist"
},
{
"title": "Senior Editor"
},
{
"title": "Financial Analyst"
},
{
"title": "Professor"
},
{
"title": "Registered Nurse"
},
{
"title": "Electrical Engineer"
},
{
"title": "Actuary"
},
{
"title": "Nuclear Power Engineer"
},
{
"title": "Social Worker"
},
{
"title": "Safety Technician IV"
},
{
"title": "Web Developer I"
}
]
+302
View File
@@ -0,0 +1,302 @@
[
{
"name": "Green Sotol"
},
{
"name": "Mexican Prairie Clover"
},
{
"name": "Stipulate Leaf-flower"
},
{
"name": "Kawelu"
},
{
"name": "Spiked Crested Coralroot"
},
{
"name": "Texas Windmill Grass"
},
{
"name": "Mountain Alder"
},
{
"name": "Macdougal Verbena"
},
{
"name": "European Aspen"
},
{
"name": "Torrey's Willowherb"
},
{
"name": "Ailanthus"
},
{
"name": "Shortstalk Stinkweed"
},
{
"name": "Black Damar"
},
{
"name": "Canelillo"
},
{
"name": "Veatch's Island Broom"
},
{
"name": "Lewton's Milkwort"
},
{
"name": "Hungarian Milkvetch"
},
{
"name": "Palmer Evening Primrose"
},
{
"name": "Smooth Chastetree"
},
{
"name": "Jaeger's Joshua Tree"
},
{
"name": "Roughhairy Maiden Fern"
},
{
"name": "Florida Orchid"
},
{
"name": "Belonia Lichen"
},
{
"name": "Bigfruit Evening Primrose"
},
{
"name": "Fitch's Tarweed"
},
{
"name": "Coastal Plain Dawnflower"
},
{
"name": "Clokey's Gilia"
},
{
"name": "Indian Jointvetch"
},
{
"name": "Wreath Lichen"
},
{
"name": "Cumberland Xanthoparmelia Lichen"
},
{
"name": "Spectacular Flatsedge"
},
{
"name": "Pride Of California"
},
{
"name": "Feverfew"
},
{
"name": "Comb Wash Buckwheat"
},
{
"name": "Sweet Woodreed"
},
{
"name": "Delicate Violet Orchid"
},
{
"name": "Canadian Blacksnakeroot"
},
{
"name": "Wax Currant"
},
{
"name": "Western Mountain Ash"
},
{
"name": "Rhodomyrtus"
},
{
"name": "Johnston's Knotweed"
},
{
"name": "Kauai Bur Cucumber"
},
{
"name": "Cain's Reedgrass"
},
{
"name": "San Diego Pitchersage"
},
{
"name": "Rock Goldenrod"
},
{
"name": "Itchgrass"
},
{
"name": "Threadleaf Horsebrush"
},
{
"name": "Red Hills Vervain"
},
{
"name": "Louisiana Bluestar"
},
{
"name": "Utah Sweetvetch"
},
{
"name": "Kauila"
},
{
"name": "Sea Hibiscus"
},
{
"name": "Derris"
},
{
"name": "Florida Tasselflower"
},
{
"name": "Glossy Hawthorn"
},
{
"name": "Ahlner's Microcalicium Lichen"
},
{
"name": "Aster"
},
{
"name": "Elegant Hawthorn"
},
{
"name": "Pricklypear"
},
{
"name": "Parry's Sage"
},
{
"name": "Redberry Buckthorn"
},
{
"name": "Baden's Bluegrass"
},
{
"name": "Utah Columbine"
},
{
"name": "Obscure Shield Lichen"
},
{
"name": "Showy Orchid"
},
{
"name": "Silverleafed Princess Flower"
},
{
"name": "Oahu Stenogyne"
},
{
"name": "Hammond's Claytonia"
},
{
"name": "Owyhee River Stickseed"
},
{
"name": "Southwestern Cosmos"
},
{
"name": "Toothed Flatsedge"
},
{
"name": "Vegetable Fern"
},
{
"name": "Rose"
},
{
"name": "Desert Wishbone-bush"
},
{
"name": "Rocky Mountain Woodsia"
},
{
"name": "East Indian Lemongrass"
},
{
"name": "Coville's Erigeron"
},
{
"name": "Spiral Flag"
},
{
"name": "Nevada Milkvetch"
},
{
"name": "Douglas's Catchfly"
},
{
"name": "Silverleaf Phacelia"
},
{
"name": "Canadian Ricegrass"
},
{
"name": "Barrier Range Wattle"
},
{
"name": "Brooks' Alsophila"
},
{
"name": "Calder's Bladderpod"
},
{
"name": "Desert Brickellbush"
},
{
"name": "Echeveria"
},
{
"name": "Caruzo"
},
{
"name": "American Black Nightshade"
},
{
"name": "Whiteflower Goldenbush"
},
{
"name": "Littleleaf Milkwort"
},
{
"name": "Fir Mistletoe"
},
{
"name": "Disc Lichen"
},
{
"name": "Flagstaff Rockcress"
},
{
"name": "Golden Spiderflower"
},
{
"name": "Yellow Fumewort"
},
{
"name": "Dot Lichen"
},
{
"name": "Ross' Avens"
},
{
"name": "Sierra Bluecup"
},
{
"name": "Sausage Tree"
}
]
-85
View File
@@ -413,90 +413,5 @@
"name": "Marie-josée",
"email": "salford2a@hubpages.com",
"image": "https://robohash.org/nihilestillo.png?size=50x50&set=set1"
},
{
"name": "Maëlle",
"email": "lbaggs2b@deviantart.com",
"image": "https://robohash.org/blanditiisetvoluptate.png?size=50x50&set=set1"
},
{
"name": "Publicité",
"email": "vpurdy2c@bravesites.com",
"image": "https://robohash.org/eumenimipsa.png?size=50x50&set=set1"
},
{
"name": "Lén",
"email": "cstraun2d@youtube.com",
"image": "https://robohash.org/temporaquisofficia.png?size=50x50&set=set1"
},
{
"name": "Maëline",
"email": "rcorney2e@blog.com",
"image": "https://robohash.org/nisimodimagnam.png?size=50x50&set=set1"
},
{
"name": "Lucrèce",
"email": "florey2f@weather.com",
"image": "https://robohash.org/nequepariaturconsequatur.png?size=50x50&set=set1"
},
{
"name": "Dorothée",
"email": "briddles2g@ucoz.ru",
"image": "https://robohash.org/voluptaserroriure.png?size=50x50&set=set1"
},
{
"name": "Irène",
"email": "kscotsbrook2h@salon.com",
"image": "https://robohash.org/ullamutearum.png?size=50x50&set=set1"
},
{
"name": "Håkan",
"email": "sshipp2i@cnbc.com",
"image": "https://robohash.org/etautillum.png?size=50x50&set=set1"
},
{
"name": "Mylène",
"email": "bbanishevitz2j@biglobe.ne.jp",
"image": "https://robohash.org/consectetureosullam.png?size=50x50&set=set1"
},
{
"name": "Styrbjörn",
"email": "mjeffries2k@wsj.com",
"image": "https://robohash.org/expeditaautemvoluptatum.png?size=50x50&set=set1"
},
{
"name": "Sòng",
"email": "mpanks2l@tripadvisor.com",
"image": "https://robohash.org/eiussintnihil.png?size=50x50&set=set1"
},
{
"name": "Faîtes",
"email": "nstewartson2m@themeforest.net",
"image": "https://robohash.org/errornumquamanimi.png?size=50x50&set=set1"
},
{
"name": "Clémence",
"email": "bslany2n@naver.com",
"image": "https://robohash.org/laboriosamconsequaturdolore.png?size=50x50&set=set1"
},
{
"name": "Maëlys",
"email": "dshubotham2o@who.int",
"image": "https://robohash.org/nobisnecessitatibusipsa.png?size=50x50&set=set1"
},
{
"name": "Inès",
"email": "akeiling2p@ycombinator.com",
"image": "https://robohash.org/etvoluptatedeserunt.png?size=50x50&set=set1"
},
{
"name": "Maëlla",
"email": "jfolonin2q@livejournal.com",
"image": "https://robohash.org/voluptatibusatqueut.png?size=50x50&set=set1"
},
{
"name": "Clémentine",
"email": "cstammirs2r@a8.net",
"image": "https://robohash.org/nihilquaesint.png?size=50x50&set=set1"
}
]
+16 -4
View File
@@ -1,10 +1,22 @@
import "dotenv/config";
import { db } from "../src/server/db";
import { users } from "../src/server/db/schema";
import fakeUsers from "./fake-users.json";
import { db, DBType } from "../src/server/db";
import { articles, categories, users } from "../src/server/db/schema";
import fakeArticles from "./fake-articles.json";
import { generateSlug } from "@/lib/utils";
import { createId } from "@paralleldrive/cuid2";
import { eq, sql } from "drizzle-orm";
async function seed() {
await db.insert(users).values(fakeUsers);
// await db.insert(users).values(fakeUsers);
// await db
// .insert(categories)
// .values(
// fakeCategories.map(({ name }) => ({ name, slug: generateSlug(name) })),
// );
await db
.insert(articles)
.values(fakeArticles.map(({ title }) => ({ title, slug: createId() })));
}
seed()