diff --git a/.env b/.env
index 30e276b..3000689 100644
--- a/.env
+++ b/.env
@@ -1,8 +1,3 @@
-# Environment variables declared in this file are automatically made available to Prisma.
-# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
-
-# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
-# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
DATABASE_URL="postgresql://postgres:cul8rman@portainer.dev.gofwd.group:5433/ballistic?schema=public"
diff --git a/package-lock.json b/package-lock.json
index 5e503e8..f4b3044 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "balistics-builder",
- "version": "0.1.0",
+ "version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "balistics-builder",
- "version": "0.1.0",
+ "version": "0.2.0",
"dependencies": {
"@chakra-ui/next-js": "^2.4.2",
"@chakra-ui/react": "^3.1.2",
@@ -20,7 +20,6 @@
"@mui/styles": "^6.1.7",
"@mui/system": "^6.1.7",
"@mui/x-data-grid": "^7.22.2",
- "@prisma/client": "^5.22.0",
"@radix-ui/react-slot": "^1.1.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
@@ -49,7 +48,6 @@
"eslint": "^8",
"eslint-config-next": "15.0.3",
"postcss": "^8",
- "prisma": "^5.22.0",
"tailwindcss": "^3.4.15",
"tsx": "^4.19.2",
"typescript": "^5.6.3"
@@ -2687,6 +2685,8 @@
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.22.0.tgz",
"integrity": "sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==",
"hasInstallScript": true,
+ "optional": true,
+ "peer": true,
"engines": {
"node": ">=16.13"
},
@@ -2703,14 +2703,16 @@
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.22.0.tgz",
"integrity": "sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==",
- "devOptional": true
+ "optional": true,
+ "peer": true
},
"node_modules/@prisma/engines": {
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.22.0.tgz",
"integrity": "sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==",
- "devOptional": true,
"hasInstallScript": true,
+ "optional": true,
+ "peer": true,
"dependencies": {
"@prisma/debug": "5.22.0",
"@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",
@@ -2722,13 +2724,15 @@
"version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2.tgz",
"integrity": "sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==",
- "devOptional": true
+ "optional": true,
+ "peer": true
},
"node_modules/@prisma/fetch-engine": {
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.22.0.tgz",
"integrity": "sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==",
- "devOptional": true,
+ "optional": true,
+ "peer": true,
"dependencies": {
"@prisma/debug": "5.22.0",
"@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",
@@ -2739,7 +2743,8 @@
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.22.0.tgz",
"integrity": "sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==",
- "devOptional": true,
+ "optional": true,
+ "peer": true,
"dependencies": {
"@prisma/debug": "5.22.0"
}
@@ -8305,8 +8310,9 @@
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-5.22.0.tgz",
"integrity": "sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==",
- "devOptional": true,
"hasInstallScript": true,
+ "optional": true,
+ "peer": true,
"dependencies": {
"@prisma/engines": "5.22.0"
},
diff --git a/src/components/UserRegistration/index.tsx b/src/components/UserRegistration/index.tsx
new file mode 100644
index 0000000..f7e7cc6
--- /dev/null
+++ b/src/components/UserRegistration/index.tsx
@@ -0,0 +1,103 @@
+// components/UserRegistration.js
+import { useState } from 'react';
+import { useToast } from '@chakra-ui/react';
+import {
+ FormControl,
+ FormLabel,
+ Input,
+ Button,
+ Stack,
+ Heading,
+} from '@chakra-ui/react';
+import { drizzle } from 'drizzle-orm';
+
+export default function UserRegistration() {
+ const [formData, setFormData] = useState({
+ username: '',
+ email: '',
+ password: '',
+ });
+
+ const toast = useToast();
+
+ const handleChange = (e) => {
+ const { name, value } = e.target;
+ setFormData({ ...formData, [name]: value });
+ };
+
+ const handleSubmit = async (e) => {
+ e.preventDefault();
+
+ // Example of database interaction using drizzle-orm:
+ const db = drizzle(/* your database connection logic */);
+
+ try {
+ // Replace 'users' with your actual table name
+ await db.insert('users').values(formData);
+ toast({
+ title: 'Account created.',
+ description: "We've created your account successfully!",
+ status: 'success',
+ duration: 5000,
+ isClosable: true,
+ });
+
+ // Reset the form
+ setFormData({ username: '', email: '', password: '' });
+ } catch (error) {
+ toast({
+ title: 'An error occurred.',
+ description: error.message,
+ status: 'error',
+ duration: 5000,
+ isClosable: true,
+ });
+ }
+ };
+
+ return (
+