-
-
- Deploy now
-
-
- Read our docs
-
+
+ {/* Header Section */}
+
+
+
Firearm Builder
+
+
+
+
+
+
+ {/* Hero Section */}
+
+
+
Build Your Dream Firearm
+
+ Customize every component of your firearm with ease and precision.
+
+
+
+ Get Started
+
+
+
+
+
+ {/* Features Section */}
+
+
+
Features
+
+
+
Extensive Database
+
+ Access thousands of firearm parts from trusted resellers.
+
+
+
+
Compatibility Checker
+
+ Ensure every part works perfectly together.
+
+
+
+
Save & Share Builds
+
+ Save your builds or share them with friends.
+
+
+
+
+
+
+ {/* About Section */}
+
+
+
About Us
+
+ Firearm Builder is your go-to platform for customizing, building,
+ and exploring firearm parts. Designed for enthusiasts by
+ enthusiasts, we make firearm building easy and accessible.
+
+
+
+
+ {/* Contact Section */}
+
+
+ {/* Footer Section */}
+
);
-}
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 15186fa..1e56749 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,6 +17,7 @@
"@mui/system": "^6.1.7",
"@mui/x-data-grid": "^7.22.2",
"@prisma/client": "^5.22.0",
+ "drizzle-orm": "^0.36.3",
"fontsource-roboto": "^4.0.0",
"next": "15.0.3",
"react": "18.2.0",
@@ -3161,6 +3162,131 @@
"csstype": "^3.0.2"
}
},
+ "node_modules/drizzle-orm": {
+ "version": "0.36.3",
+ "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.36.3.tgz",
+ "integrity": "sha512-ffQB7CcyCTvQBK6xtRLMl/Jsd5xFTBs+UTHrgs1hbk68i5TPkbsoCPbKEwiEsQZfq2I7VH632XJpV1g7LS2H9Q==",
+ "license": "Apache-2.0",
+ "peerDependencies": {
+ "@aws-sdk/client-rds-data": ">=3",
+ "@cloudflare/workers-types": ">=3",
+ "@electric-sql/pglite": ">=0.2.0",
+ "@libsql/client": ">=0.10.0",
+ "@libsql/client-wasm": ">=0.10.0",
+ "@neondatabase/serverless": ">=0.1",
+ "@op-engineering/op-sqlite": ">=2",
+ "@opentelemetry/api": "^1.4.1",
+ "@planetscale/database": ">=1",
+ "@prisma/client": "*",
+ "@tidbcloud/serverless": "*",
+ "@types/better-sqlite3": "*",
+ "@types/pg": "*",
+ "@types/react": ">=18",
+ "@types/sql.js": "*",
+ "@vercel/postgres": ">=0.8.0",
+ "@xata.io/client": "*",
+ "better-sqlite3": ">=7",
+ "bun-types": "*",
+ "expo-sqlite": ">=14.0.0",
+ "knex": "*",
+ "kysely": "*",
+ "mysql2": ">=2",
+ "pg": ">=8",
+ "postgres": ">=3",
+ "react": ">=18",
+ "sql.js": ">=1",
+ "sqlite3": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/client-rds-data": {
+ "optional": true
+ },
+ "@cloudflare/workers-types": {
+ "optional": true
+ },
+ "@electric-sql/pglite": {
+ "optional": true
+ },
+ "@libsql/client": {
+ "optional": true
+ },
+ "@libsql/client-wasm": {
+ "optional": true
+ },
+ "@neondatabase/serverless": {
+ "optional": true
+ },
+ "@op-engineering/op-sqlite": {
+ "optional": true
+ },
+ "@opentelemetry/api": {
+ "optional": true
+ },
+ "@planetscale/database": {
+ "optional": true
+ },
+ "@prisma/client": {
+ "optional": true
+ },
+ "@tidbcloud/serverless": {
+ "optional": true
+ },
+ "@types/better-sqlite3": {
+ "optional": true
+ },
+ "@types/pg": {
+ "optional": true
+ },
+ "@types/react": {
+ "optional": true
+ },
+ "@types/sql.js": {
+ "optional": true
+ },
+ "@vercel/postgres": {
+ "optional": true
+ },
+ "@xata.io/client": {
+ "optional": true
+ },
+ "better-sqlite3": {
+ "optional": true
+ },
+ "bun-types": {
+ "optional": true
+ },
+ "expo-sqlite": {
+ "optional": true
+ },
+ "knex": {
+ "optional": true
+ },
+ "kysely": {
+ "optional": true
+ },
+ "mysql2": {
+ "optional": true
+ },
+ "pg": {
+ "optional": true
+ },
+ "postgres": {
+ "optional": true
+ },
+ "prisma": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "sql.js": {
+ "optional": true
+ },
+ "sqlite3": {
+ "optional": true
+ }
+ }
+ },
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
diff --git a/package.json b/package.json
index 394eb62..6bb7671 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
"@mui/system": "^6.1.7",
"@mui/x-data-grid": "^7.22.2",
"@prisma/client": "^5.22.0",
+ "drizzle-orm": "^0.36.3",
"fontsource-roboto": "^4.0.0",
"next": "15.0.3",
"react": "18.2.0",
diff --git a/pages/api/products.js b/pages/api/products.js
new file mode 100644
index 0000000..20c5d61
--- /dev/null
+++ b/pages/api/products.js
@@ -0,0 +1,9 @@
+export default function handler(req, res) {
+ const products = [
+ { id: 1, name: "Barrel A", description: "High-quality steel barrel.", price: 120 },
+ { id: 2, name: "Scope X", description: "Precision optical scope.", price: 300 },
+ { id: 3, name: "Stock Z", description: "Ergonomic polymer stock.", price: 80 },
+ ];
+
+ res.status(200).json(products);
+ }
\ No newline at end of file
diff --git a/pages/builder.js b/pages/builder.js
new file mode 100644
index 0000000..6fe47d9
--- /dev/null
+++ b/pages/builder.js
@@ -0,0 +1,56 @@
+import { useState } from "react";
+
+export default function Builder() {
+ const [build, setBuild] = useState([]);
+ const [part, setPart] = useState("");
+
+ const addPartToBuild = () => {
+ if (part) {
+ setBuild([...build, part]);
+ setPart("");
+ }
+ };
+
+ const removePartFromBuild = (index) => {
+ setBuild(build.filter((_, i) => i !== index));
+ };
+
+ return (
+
+
+
Build Your Firearm
+
+
+ setPart(e.target.value)}
+ />
+
+ Add Part
+
+
+
Current Build
+
+ {build.map((p, index) => (
+
+ {p}
+ removePartFromBuild(index)}
+ >
+ Remove
+
+
+ ))}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/pages/oldindex.js b/pages/oldindex.js
new file mode 100644
index 0000000..8c443e7
--- /dev/null
+++ b/pages/oldindex.js
@@ -0,0 +1,98 @@
+import Link from "next/link";
+
+export default function Home() {
+ return (
+
+ {/* Header Section */}
+
+
+
Firearm Builder
+
+
+
+
+
+
+ {/* Hero Section */}
+
+
+
Build Your Dream Firearm
+
+ Customize every component of your firearm with ease and precision.
+
+
+
+ Get Started
+
+
+
+
+
+ {/* Features Section */}
+
+
+
Features
+
+
+
Extensive Database
+
+ Access thousands of firearm parts from trusted resellers.
+
+
+
+
Compatibility Checker
+
+ Ensure every part works perfectly together.
+
+
+
+
Save & Share Builds
+
+ Save your builds or share them with friends.
+
+
+
+
+
+
+ {/* About Section */}
+
+
+
About Us
+
+ Firearm Builder is your go-to platform for customizing, building,
+ and exploring firearm parts. Designed for enthusiasts by
+ enthusiasts, we make firearm building easy and accessible.
+
+
+
+
+ {/* Contact Section */}
+
+
+ {/* Footer Section */}
+
+
+ );
+}
\ No newline at end of file
diff --git a/pages/products.js b/pages/products.js
new file mode 100644
index 0000000..611e018
--- /dev/null
+++ b/pages/products.js
@@ -0,0 +1,43 @@
+import { useEffect, useState } from "react";
+
+export default function Products() {
+ const [products, setProducts] = useState([]);
+ const [loading, setLoading] = useState(true);
+
+ // Fetch products from an API
+ useEffect(() => {
+ async function fetchProducts() {
+ try {
+ const response = await fetch("https://api.example.com/products");
+ const data = await response.json();
+ setProducts(data);
+ setLoading(false);
+ } catch (error) {
+ console.error("Error fetching products:", error);
+ setLoading(false);
+ }
+ }
+ fetchProducts();
+ }, []);
+
+ return (
+
+
+
Products
+ {loading ? (
+
Loading products...
+ ) : (
+
+ {products.map((product) => (
+
+
{product.name}
+
{product.description}
+
${product.price}
+
+ ))}
+
+ )}
+
+
+ );
+}
\ No newline at end of file