{"id":27946462,"url":"https://github.com/gideon-dev/bluedashboard","last_synced_at":"2026-07-07T03:31:18.977Z","repository":{"id":251724105,"uuid":"833997868","full_name":"Gideon-dev/BlueDashboard","owner":"Gideon-dev","description":"A complete firm dashboard leveraging react on nextjs and backend using postgres","archived":false,"fork":false,"pushed_at":"2024-08-05T09:14:22.000Z","size":919,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T13:55:06.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blue-dashboard-azure.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gideon-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T07:55:18.000Z","updated_at":"2024-08-05T09:14:26.000Z","dependencies_parsed_at":"2024-08-05T11:07:13.971Z","dependency_job_id":null,"html_url":"https://github.com/Gideon-dev/BlueDashboard","commit_stats":null,"previous_names":["gideon-dev/bluedashboard"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gideon-dev%2FBlueDashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gideon-dev%2FBlueDashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gideon-dev%2FBlueDashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gideon-dev%2FBlueDashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gideon-dev","download_url":"https://codeload.github.com/Gideon-dev/BlueDashboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892529,"owners_count":21820646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T13:55:08.892Z","updated_at":"2025-10-27T15:43:39.000Z","avatar_url":"https://github.com/Gideon-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Next.js App Router Course - Starter\n\nThis is the starter template for the Next.js App Router Course. It contains the starting code for the dashboard application.\n\nFor more information, see the [course curriculum](https://nextjs.org/learn) on the Next.js Website.\n\n\nimport bcrypt from 'bcrypt';\nimport { db } from '@vercel/postgres';\nimport { invoices, customers, revenue, users } from '../lib/placeholder-data';\n\nconst client = await db.connect();\n\nasync function seedUsers() {\n  await client.sql`CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"`;\n  await client.sql`\n    CREATE TABLE IF NOT EXISTS users (\n      id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,\n      name VARCHAR(255) NOT NULL,\n      email TEXT NOT NULL UNIQUE,\n      password TEXT NOT NULL\n    );\n  `;\n\n  const insertedUsers = await Promise.all(\n    users.map(async (user) =\u003e {\n      const hashedPassword = await bcrypt.hash(user.password, 10);\n      return client.sql`\n        INSERT INTO users (id, name, email, password)\n        VALUES (${user.id}, ${user.name}, ${user.email}, ${hashedPassword})\n        ON CONFLICT (id) DO NOTHING;\n      `;\n    }),\n  );\n\n  return insertedUsers;\n}\n\nasync function seedInvoices() {\n  await client.sql`CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"`;\n\n  await client.sql`\n    CREATE TABLE IF NOT EXISTS invoices (\n      id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,\n      customer_id UUID NOT NULL,\n      amount INT NOT NULL,\n      status VARCHAR(255) NOT NULL,\n      date DATE NOT NULL\n    );\n  `;\n\n  const insertedInvoices = await Promise.all(\n    invoices.map(\n      (invoice) =\u003e client.sql`\n        INSERT INTO invoices (customer_id, amount, status, date)\n        VALUES (${invoice.customer_id}, ${invoice.amount}, ${invoice.status}, ${invoice.date})\n        ON CONFLICT (id) DO NOTHING;\n      `,\n    ),\n  );\n\n  return insertedInvoices;\n}\n\nasync function seedCustomers() {\n  await client.sql`CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"`;\n\n  await client.sql`\n    CREATE TABLE IF NOT EXISTS customers (\n      id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,\n      name VARCHAR(255) NOT NULL,\n      email VARCHAR(255) NOT NULL,\n      image_url VARCHAR(255) NOT NULL\n    );\n  `;\n\n  const insertedCustomers = await Promise.all(\n    customers.map(\n      (customer) =\u003e client.sql`\n        INSERT INTO customers (id, name, email, image_url)\n        VALUES (${customer.id}, ${customer.name}, ${customer.email}, ${customer.image_url})\n        ON CONFLICT (id) DO NOTHING;\n      `,\n    ),\n  );\n\n  return insertedCustomers;\n}\n\nasync function seedRevenue() {\n  await client.sql`\n    CREATE TABLE IF NOT EXISTS revenue (\n      month VARCHAR(4) NOT NULL UNIQUE,\n      revenue INT NOT NULL\n    );\n  `;\n\n  const insertedRevenue = await Promise.all(\n    revenue.map(\n      (rev) =\u003e client.sql`\n        INSERT INTO revenue (month, revenue)\n        VALUES (${rev.month}, ${rev.revenue})\n        ON CONFLICT (month) DO NOTHING;\n      `,\n    ),\n  );\n\n  return insertedRevenue;\n}\n\nexport async function GET() {\n  return Response.json({\n    message:\n      'Uncomment this file and remove this line. You can delete this file when you are finished.',\n  });\n  try {\n    await client.sql`BEGIN`;\n    await seedUsers();\n    await seedCustomers();\n    await seedInvoices();\n    await seedRevenue();\n    await client.sql`COMMIT`;\n\n    return Response.json({ message: 'Database seeded successfully' });\n  } catch (error) {\n    await client.sql`ROLLBACK`;\n    return Response.json({ error }, { status: 500 });\n  }\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgideon-dev%2Fbluedashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgideon-dev%2Fbluedashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgideon-dev%2Fbluedashboard/lists"}