diff --git a/app/Fragments/Armory/index.tsx b/app/Fragments/Armory/index.tsx new file mode 100644 index 0000000..aab471b --- /dev/null +++ b/app/Fragments/Armory/index.tsx @@ -0,0 +1,29 @@ +import { sectionLinks } from "@/app/lib/linkList/sectionLinks"; +import Link from "next/link"; +import armoryLinks from "@/app/lib/linkList/sectionLinks"; + +let linksArray = [ + sectionLinks.UPPERS, + sectionLinks.LOWERS, + sectionLinks.BARRELS, + sectionLinks.OPTICS, + sectionLinks.ACCESSORIES, +]; +export const Armory = (props) => { + return ( +
+ {armoryLinks.length} +

{props.titleText}

+ +
+ ) +} +export default Armory; \ No newline at end of file diff --git a/app/Fragments/Armory/package.json b/app/Fragments/Armory/package.json new file mode 100644 index 0000000..8d645ac --- /dev/null +++ b/app/Fragments/Armory/package.json @@ -0,0 +1,23 @@ +{ + "name": "armory", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/Fragments/Armory/style.module.scss b/app/Fragments/Armory/style.module.scss new file mode 100644 index 0000000..b9c807d --- /dev/null +++ b/app/Fragments/Armory/style.module.scss @@ -0,0 +1 @@ +@import '../../scss/variables.scss'; \ No newline at end of file diff --git a/app/Fragments/Button/index.js b/app/Fragments/Button/index.js new file mode 100644 index 0000000..76485c3 --- /dev/null +++ b/app/Fragments/Button/index.js @@ -0,0 +1,38 @@ +import React from 'react'; + +import styles from './style.module.scss' + +const Button = ({ + children, + className, + color = 'black', + type = 'button', + ...props +}) => ( + +); + +const ButtonUnobtrusive = ({ + children, + className, + type = 'button', + ...props +}) => ( + +); + +export { ButtonUnobtrusive }; + +export default Button; diff --git a/app/Fragments/Button/package.json b/app/Fragments/Button/package.json new file mode 100644 index 0000000..0f331ef --- /dev/null +++ b/app/Fragments/Button/package.json @@ -0,0 +1,23 @@ +{ + "name": "button", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/Fragments/Button/style.module.scss b/app/Fragments/Button/style.module.scss new file mode 100644 index 0000000..7dcc5ad --- /dev/null +++ b/app/Fragments/Button/style.module.scss @@ -0,0 +1,46 @@ +.Button { + padding: 10px; + background: none; + cursor: pointer; + transition: color 0.25s ease-in-out; + transition: background 0.25s ease-in-out; +} + +.Button_white { + border: 1px solid #fff; + color: #fff; +} + +.Button_white:hover { + color: #000; + background: #fff; +} + +.Button_black { + border: 1px solid #000; + color: #000; +} + +.Button_black:hover { + color: #fff; + background: #000; +} + +.Button_unobtrusive { + padding: 0; + color: #000; + background: none; + border: none; + cursor: pointer; + opacity: 1; + transition: opacity 0.25s ease-in-out; + outline: none; +} + +.Button_unobtrusive:hover { + opacity: 0.35; +} + +.Button_unobtrusive:focus { + outline: none; +} \ No newline at end of file diff --git a/app/Fragments/DSTPageHeader/index.js b/app/Fragments/DSTPageHeader/index.js new file mode 100644 index 0000000..d67d371 --- /dev/null +++ b/app/Fragments/DSTPageHeader/index.js @@ -0,0 +1,8 @@ + +const DSTPageHeader = props => { + return ( +
{props.title}
+ + ) +} +export default DSTPageHeader \ No newline at end of file diff --git a/app/Fragments/DSTPageHeader/package.json b/app/Fragments/DSTPageHeader/package.json new file mode 100644 index 0000000..47ecdf7 --- /dev/null +++ b/app/Fragments/DSTPageHeader/package.json @@ -0,0 +1,23 @@ +{ + "name": "DSTPageHeader", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/components/Hero/styles.module.css b/app/Fragments/DSTPageHeader/styles.module.css similarity index 100% rename from components/Hero/styles.module.css rename to app/Fragments/DSTPageHeader/styles.module.css diff --git a/app/Fragments/Error/index.js b/app/Fragments/Error/index.js new file mode 100644 index 0000000..e498e75 --- /dev/null +++ b/app/Fragments/Error/index.js @@ -0,0 +1,11 @@ +import React from 'react'; + +import styles from './style.module.css'; + +const ErrorMessage = ({ error }) => ( +
+ {error.toString()} +
+); + +export default ErrorMessage; diff --git a/app/Fragments/Error/package.json b/app/Fragments/Error/package.json new file mode 100644 index 0000000..eb831d9 --- /dev/null +++ b/app/Fragments/Error/package.json @@ -0,0 +1,23 @@ +{ + "name": "error", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/Fragments/Error/style.module.css b/app/Fragments/Error/style.module.css new file mode 100644 index 0000000..9933d45 --- /dev/null +++ b/app/Fragments/Error/style.module.css @@ -0,0 +1,5 @@ +.ErrorMessage { + margin: 20px; + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/app/Fragments/FooterLink/index.tsx b/app/Fragments/FooterLink/index.tsx new file mode 100644 index 0000000..e4ce63b --- /dev/null +++ b/app/Fragments/FooterLink/index.tsx @@ -0,0 +1,13 @@ +import { ListItemText, Link } from "@mui/material"; +import styles from './styles.module.css' +import { withStyles } from '@mui/material/styles'; +import styled from '@emotion/styled' +import React from "react"; + +export default function FooterLink(props) { + return ( + + {props.title} + + ) +} \ No newline at end of file diff --git a/app/Fragments/FooterLink/package.json b/app/Fragments/FooterLink/package.json new file mode 100644 index 0000000..0053845 --- /dev/null +++ b/app/Fragments/FooterLink/package.json @@ -0,0 +1,23 @@ +{ + "name": "footerlink", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/Fragments/FooterLink/styles.module.css b/app/Fragments/FooterLink/styles.module.css new file mode 100644 index 0000000..d7245c0 --- /dev/null +++ b/app/Fragments/FooterLink/styles.module.css @@ -0,0 +1,5 @@ + +.navLinks:hover { + font-weight: bold; + text-decoration : none; +} \ No newline at end of file diff --git a/app/Fragments/GroundZero/index.tsx b/app/Fragments/GroundZero/index.tsx new file mode 100644 index 0000000..c371a9d --- /dev/null +++ b/app/Fragments/GroundZero/index.tsx @@ -0,0 +1,28 @@ +import { sectionLinks } from "@/app/lib/linkList/sectionLinks"; +import Link from "next/link"; + +let linksArray = [ + sectionLinks.BLOG, + sectionLinks.PRICEDROPS, + sectionLinks.BUILDS, + sectionLinks.BUILDGUIDES, +]; + +export const GroundZero = (props) => { + return ( +
+

{props.titleText}

+ +
+ + ) +} +export default GroundZero; \ No newline at end of file diff --git a/app/Fragments/GroundZero/package.json b/app/Fragments/GroundZero/package.json new file mode 100644 index 0000000..04c21bf --- /dev/null +++ b/app/Fragments/GroundZero/package.json @@ -0,0 +1,23 @@ +{ + "name": "groundzero", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/Fragments/GroundZero/style.module.scss b/app/Fragments/GroundZero/style.module.scss new file mode 100644 index 0000000..b9c807d --- /dev/null +++ b/app/Fragments/GroundZero/style.module.scss @@ -0,0 +1 @@ +@import '../../scss/variables.scss'; \ No newline at end of file diff --git a/app/Fragments/Information/index.tsx b/app/Fragments/Information/index.tsx new file mode 100644 index 0000000..4d631f0 --- /dev/null +++ b/app/Fragments/Information/index.tsx @@ -0,0 +1,27 @@ +import { infoLinks } from "@/app/lib/linkList/infoLinks"; +import Link from "next/link"; +let linksArray = [ + infoLinks.ABOUT, + infoLinks.FAQ, + infoLinks.DISCLOSURE, + infoLinks.PRIVACYPOLICY, + infoLinks.PIP, + infoLinks.TOS +]; +export const Information = (props) => { + return ( +
+

{props.titleText}

+ +
+ ) +} +export default Information; \ No newline at end of file diff --git a/app/Fragments/Information/package.json b/app/Fragments/Information/package.json new file mode 100644 index 0000000..bb5d076 --- /dev/null +++ b/app/Fragments/Information/package.json @@ -0,0 +1,23 @@ +{ + "name": "information", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/Fragments/Information/style.module.scss b/app/Fragments/Information/style.module.scss new file mode 100644 index 0000000..b9c807d --- /dev/null +++ b/app/Fragments/Information/style.module.scss @@ -0,0 +1 @@ +@import '../../scss/variables.scss'; \ No newline at end of file diff --git a/app/Fragments/States/index.tsx b/app/Fragments/States/index.tsx new file mode 100644 index 0000000..a58ca91 --- /dev/null +++ b/app/Fragments/States/index.tsx @@ -0,0 +1,70 @@ +import React from 'react'; +import { makeStyles } from '@mui/material/styles'; +import InputLabel from '@mui/material/InputLabel'; +import FormHelperText from '@mui/material/FormHelperText'; +import FormControl from '@mui/material/FormControl'; +import Select from '@mui/material/Select'; +import NativeSelect from '@mui/material/NativeSelect'; +import { useQuery, gql } from "@apollo/client"; + + +const useStyles = makeStyles((theme) => ({ + formControl: { + margin: theme.spacing(1), + minWidth: 120, + }, + selectEmpty: { + marginTop: theme.spacing(2), + }, +})); + + const GET_STATES = gql` + { + states { + abbrev + name + } + }` + +export default function StateNativeSelects() { + const classes = useStyles(); + const [state, setState] = React.useState({ + abbrev: '', + name: '', + }); + + const handleChange = (event) => { + const name = event.target.name; + setState({ + ...state, + [name]: event.target.value, + }); + }; + +const { loading, error, data } = useQuery(GET_STATES); + + if (loading) return

Loading...

; + if (error) return

Error :(

; + + return ( +
+ + State + + +
+ ); +} diff --git a/components/Footer/FooterLinks/index copy.js b/app/components/Footer/FooterLinks/index copy.js similarity index 100% rename from components/Footer/FooterLinks/index copy.js rename to app/components/Footer/FooterLinks/index copy.js diff --git a/components/Footer/FooterLinks/index.js b/app/components/Footer/FooterLinks/index.js similarity index 72% rename from components/Footer/FooterLinks/index.js rename to app/components/Footer/FooterLinks/index.js index 19aadf3..27dde9f 100644 --- a/components/Footer/FooterLinks/index.js +++ b/app/components/Footer/FooterLinks/index.js @@ -8,23 +8,8 @@ import TypoGraphy from '@mui/material/Typography' import Link from 'next/link' import { withStyles } from '@mui/material/styles'; import styled from '@emotion/styled' -import FooterLink from '@/fragments/FooterLink'; +import FooterLink from '@/app/Fragments/FooterLink'; -// SS - IDK what this is. It feels hacky.. -// DS - Because it is hacky, its stupid javascript magic -// const useStyles = theme => ({ //const makes a constant, => defines a function, -// so it looks like useStyles will end up beign a function that is actually the theme function -// the useStyles function will have properties in root, so useStyles.root -// root: { -// width: '75%', -// maxWidth: 260, -// /* backgroundColor: theme.palette.background.paper, */ -// float: 'right', -// marginRight: '2%', -// fontSize: '.80em' -// }, -// }); -// } class FooterLinks extends React.Component { constructor(props) { diff --git a/components/Footer/FooterLinks/package.json b/app/components/Footer/FooterLinks/package.json similarity index 100% rename from components/Footer/FooterLinks/package.json rename to app/components/Footer/FooterLinks/package.json diff --git a/components/Footer/FooterLinks/styles.module.css b/app/components/Footer/FooterLinks/styles.module.css similarity index 100% rename from components/Footer/FooterLinks/styles.module.css rename to app/components/Footer/FooterLinks/styles.module.css diff --git a/components/Footer/index.tsx b/app/components/Footer/index.tsx similarity index 74% rename from components/Footer/index.tsx rename to app/components/Footer/index.tsx index aa5b340..79a2dfb 100644 --- a/components/Footer/index.tsx +++ b/app/components/Footer/index.tsx @@ -1,14 +1,14 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; import styles from './styles.module.scss'; -import Copyright from "@/components/Info/Copyright"; +import Copyright from "@/app/components/Info/Copyright"; import FooterLinks from "./FooterLinks"; import Link from "next/link"; -import { infoLinks } from "@/lib/linkList/infoLinks"; -import { sectionLinks } from "@/lib/linkList/sectionLinks"; -import Armory from '@/fragments/Armory'; -import GroundZero from "@/fragments/GroundZero"; -import Information from "@/fragments/Information"; +import { infoLinks } from "@/app/lib/linkList/infoLinks"; +import { sectionLinks } from "@/app/lib/linkList/sectionLinks"; +import Armory from '@/app/Fragments/Armory'; +import GroundZero from "@/app/Fragments/GroundZero"; +import Information from "@/app/Fragments/Information"; export const Footer = () => { return ( diff --git a/components/Footer/package.json b/app/components/Footer/package.json similarity index 100% rename from components/Footer/package.json rename to app/components/Footer/package.json diff --git a/components/Footer/styles.module.scss b/app/components/Footer/styles.module.scss similarity index 100% rename from components/Footer/styles.module.scss rename to app/components/Footer/styles.module.scss diff --git a/components/Header/index.tsx b/app/components/Header/index.tsx similarity index 96% rename from components/Header/index.tsx rename to app/components/Header/index.tsx index cac982a..312c75e 100644 --- a/components/Header/index.tsx +++ b/app/components/Header/index.tsx @@ -9,8 +9,8 @@ import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material//ListItemText'; // import TypoGraphy from '@mui/material/Typography'; import Button from '@mui/material//Button'; -import { infoLinks } from '@/lib/linkList/infoLinks'; -import sectionLinks from '@/lib/linkList/sectionLinks'; +import { infoLinks } from '@/app/lib/linkList/infoLinks'; +import sectionLinks from '@/app/lib/linkList/sectionLinks'; export default class Header extends Component { constructor(props) { diff --git a/components/Header/package.json b/app/components/Header/package.json similarity index 100% rename from components/Header/package.json rename to app/components/Header/package.json diff --git a/components/Header/styles.module.css b/app/components/Header/styles.module.css similarity index 100% rename from components/Header/styles.module.css rename to app/components/Header/styles.module.css diff --git a/components/Hero/index.tsx b/app/components/Hero/index.tsx similarity index 100% rename from components/Hero/index.tsx rename to app/components/Hero/index.tsx diff --git a/components/Hero/package.json b/app/components/Hero/package.json similarity index 100% rename from components/Hero/package.json rename to app/components/Hero/package.json diff --git a/app/components/Hero/styles.module.css b/app/components/Hero/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/About/index.tsx b/app/components/Info/About/index.tsx new file mode 100644 index 0000000..055d46c --- /dev/null +++ b/app/components/Info/About/index.tsx @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' //ES6 +import styles from './styles.module.css' +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function About(props) { + + const GET_SITE_CONTENT = gql` + query Get_Site_Content { + site_contents(where: {content_id: {_eq: "ABOUTUS"}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT); + if (loading) return "Loading ..."; + if (error) return `Error! ${error.message}`; + + return ( +
+

About

+ {data.site_contents.map((site_content: { content: any; }) => ( + + ))} +
+ ) +} + + +About.propTypes = { + +}; diff --git a/app/components/Info/About/package.json b/app/components/Info/About/package.json new file mode 100644 index 0000000..0992d59 --- /dev/null +++ b/app/components/Info/About/package.json @@ -0,0 +1,23 @@ +{ + "name": "about", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/About/styles.module.css b/app/components/Info/About/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/ContactUs/index.tsx b/app/components/Info/ContactUs/index.tsx new file mode 100644 index 0000000..25a75b0 --- /dev/null +++ b/app/components/Info/ContactUs/index.tsx @@ -0,0 +1,39 @@ +import React, { Component } from 'react' +import TypoGraphy from '@mui/material/Typography'; +import PropTypes from 'prop-types' //ES6 +import styles from './styles.module.css'; +import constants from '@/app/lib/constants' + +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function ContactUs(props) { + + const GET_SITE_CONTENT = gql` + query Get_Site_Content { + site_contents(where: {content_id: {_eq: "CONTACTUS"}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT); + if (loading) return "Loading ..."; + if (error) return `Error! ${error.message}`; + + return ( +
+ + {data.site_contents.map((site_content: { content: any; }) => ( + + ))} + +
+ ) + +} + +ContactUs.propTypes = { + +}; diff --git a/app/components/Info/ContactUs/package.json b/app/components/Info/ContactUs/package.json new file mode 100644 index 0000000..06d382c --- /dev/null +++ b/app/components/Info/ContactUs/package.json @@ -0,0 +1,23 @@ +{ + "name": "contactus", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/ContactUs/styles.module.css b/app/components/Info/ContactUs/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/Copyright/index.tsx b/app/components/Info/Copyright/index.tsx new file mode 100644 index 0000000..5ae1961 --- /dev/null +++ b/app/components/Info/Copyright/index.tsx @@ -0,0 +1,41 @@ +import React, { Component } from 'react'; +import { COMPANY_NAME, COMPANY_URL } from '@/app/lib/constants'; +import Typography from '@mui/material/Typography'; +import MuiLink from '@mui/material/Link'; +import styles from './styles.module.css' +import Link from 'next/link' +import styled from '@emotion/styled' + + +export default class Copyright extends Component { + render() { + return ( + +
©  {new Date().getFullYear()} {' '} + + {COMPANY_NAME} + {' '} + All Rights Reserved. +
+
+ + ) + } +} + +const CopyStyled = styled.div` + .copyright { + background: #4c5c3f; + font-size:.80em; + text-transform: uppercase; + color:#FFF; + display: block; + width:100%; + text-align:center; + + a { + color:#FFF; + text-decoration:none; + } + } +` \ No newline at end of file diff --git a/app/components/Info/Copyright/package.json b/app/components/Info/Copyright/package.json new file mode 100644 index 0000000..58d9367 --- /dev/null +++ b/app/components/Info/Copyright/package.json @@ -0,0 +1,23 @@ +{ + "name": "copyright", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/Copyright/styles.module.css b/app/components/Info/Copyright/styles.module.css new file mode 100644 index 0000000..a40c187 --- /dev/null +++ b/app/components/Info/Copyright/styles.module.css @@ -0,0 +1,7 @@ +.white { + color: white; + font-size: .5em; + text-transform: uppercase; + letter-spacing: 2px; + font-family: "hind"; +} \ No newline at end of file diff --git a/app/components/Info/Disclosure/index.tsx b/app/components/Info/Disclosure/index.tsx new file mode 100644 index 0000000..fa665cf --- /dev/null +++ b/app/components/Info/Disclosure/index.tsx @@ -0,0 +1,54 @@ +import React, { Component } from 'react' +import TypoGraphy from '@mui/material/Typography'; +import PropTypes from 'prop-types' //ES6 +import styles from './styles.module.css'; +import constants from '@/app/lib/constants' +import {SITE_CONT_TYPE} from '@/app/lib/constants' +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function Disclosure(props) { + + const GET_SITE_CONTENT = gql` + query Get_Site_Content { + site_contents(where: {content_id: {_eq: ${SITE_CONT_TYPE.DISCLOSURE}}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT); + if (loading) return "Loading ..."; + if (error) return `Error! ${error.message}`; + return ( +
+ + {constants.SITE_NAME}, owned by {constants.COMPANY_NAME}, receives compensation through affiliate relationships with merchants listed on this site. Please know that this in no way affects reviews, benchmarks, content, or this site's opinions of products, services, manufacturers, partners, or merchants. + + + The mission of {constants.SITE_NAME} is to provide the best functionality for this site's users, regardless of any potential affiliate commissions. + {constants.SITE_NAME} does not accept donations. Instead, income received from affiliate relationships funds site maintenance and feature development. If you desire to donate to PCPartPicker, I kindly ask that you consider donating to a charitable organization instead. I am particularly fond of the NRA, a non-profit organization that provides safety training to gun owners. + +
+ {data.site_contents.map((site_content: { content: any; }) => ( + + ))} +
+ + Thanks, + + + {constants.COMPANY_NAME} + + + {constants.SITE_NAME} is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. + +
+ ) +} + + +Disclosure.propTypes = { + +}; diff --git a/app/components/Info/Disclosure/package.json b/app/components/Info/Disclosure/package.json new file mode 100644 index 0000000..993303e --- /dev/null +++ b/app/components/Info/Disclosure/package.json @@ -0,0 +1,23 @@ +{ + "name": "disclosure", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/Disclosure/styles.module.css b/app/components/Info/Disclosure/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/Faq/index.tsx b/app/components/Info/Faq/index.tsx new file mode 100644 index 0000000..babfa2e --- /dev/null +++ b/app/components/Info/Faq/index.tsx @@ -0,0 +1,34 @@ +import React, { Component } from 'react'; +import styles from './styles.module.css' +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function Faq(props) { + + const GET_SITE_CONTENT_FAQ = gql` + query Get_Site_Content_Faq { + site_contents(where: {content_id: {_eq: "FAQ"}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT_FAQ); + if(loading) return "Loading ..."; + if(error) return `Error! ${error.message}` ; + + return ( + +
+ {props.children} +

Frequently Asked Questions

+
+ {data.site_contents.map((site_content: { content: any; }) => ( + + ))} + +
+
+ ) +} diff --git a/app/components/Info/Faq/package.json b/app/components/Info/Faq/package.json new file mode 100644 index 0000000..8bf5f47 --- /dev/null +++ b/app/components/Info/Faq/package.json @@ -0,0 +1,23 @@ +{ + "name": "faq", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/Faq/styles.module.css b/app/components/Info/Faq/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/PIP/index.tsx b/app/components/Info/PIP/index.tsx new file mode 100644 index 0000000..2ed2a0b --- /dev/null +++ b/app/components/Info/PIP/index.tsx @@ -0,0 +1,39 @@ +import React, { Component } from 'react' +import Head from 'next/head'; +import TypoGraphy from '@mui/material/Typography'; +import PropTypes from 'prop-types' //ES6 +import styles from './styles.module.css'; +import constants from '@/app/lib/constants' +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function PIP(props) { + const GET_SITE_CONTENT = gql` + query Get_Site_Content { + site_contents(where: {content_id: {_eq: "PIP"}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT); + if (loading) return "Loading ..."; + if (error) return `Error! ${error.message}`; + + return ( +
+ + + + {data.site_contents.map((site_content: { content: any; }) => ( + + ))} + +
+ ) +} + +PIP.propTypes = { + +}; diff --git a/app/components/Info/PIP/package.json b/app/components/Info/PIP/package.json new file mode 100644 index 0000000..7788c82 --- /dev/null +++ b/app/components/Info/PIP/package.json @@ -0,0 +1,23 @@ +{ + "name": "pip", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/PIP/styles.module.css b/app/components/Info/PIP/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/PrivacyPolicy/index.tsx b/app/components/Info/PrivacyPolicy/index.tsx new file mode 100644 index 0000000..de78f16 --- /dev/null +++ b/app/components/Info/PrivacyPolicy/index.tsx @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import TypoGraphy from '@mui/material/Typography'; +import Head from 'next/head'; +import PropTypes from 'prop-types' //ES6 +import styles from './styles.module.css'; +import constants from '@/app/lib/constants' +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function PrivacyPolicy(props) { + const GET_SITE_CONTENT = gql` + query Get_Site_Content { + site_contents(where: {content_id: {_eq: "PP"}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT); + if (loading) return "Loading ..."; + if (error) return `Error! ${error.message}`; + + return ( +
+ + + {data.site_contents.map((site_content: { content: any; }) => ( + + ))} + +
+ ) + } + \ No newline at end of file diff --git a/app/components/Info/PrivacyPolicy/package.json b/app/components/Info/PrivacyPolicy/package.json new file mode 100644 index 0000000..6de89ba --- /dev/null +++ b/app/components/Info/PrivacyPolicy/package.json @@ -0,0 +1,23 @@ +{ + "name": "privacypolicy", + "version": "0.0.0", + "private": true, + "main": "./index", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/PrivacyPolicy/styles.module.css b/app/components/Info/PrivacyPolicy/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Info/TermsOfService/index.tsx b/app/components/Info/TermsOfService/index.tsx new file mode 100644 index 0000000..68b3951 --- /dev/null +++ b/app/components/Info/TermsOfService/index.tsx @@ -0,0 +1,38 @@ +import React, { Component } from 'react' +import Head from 'next/head'; +import TypoGraphy from '@mui/material/Typography'; +import PropTypes from 'prop-types' //ES6 +import constants from '@/app/lib/constants' +import { useQuery, useMutation, gql } from "@apollo/client"; + +export default function TermsOfService(props) { + const GET_SITE_CONTENT = gql` + query Get_Site_Content { + site_contents(where: {content_id: {_eq: "TOS"}}, order_by: {content: asc}) { + id + content_id + content + } + } + `; + + const { loading, error, data } = useQuery(GET_SITE_CONTENT); + if (loading) return "Loading ..."; + if (error) return `Error! ${error.message}`; + return ( +
+ + +
+ {data.site_contents.map((site_content: { content: any; }) => ( + + ))} +
+
+
+ ) +} + +TermsOfService.propTypes = { + +}; diff --git a/app/components/Info/TermsOfService/package.json b/app/components/Info/TermsOfService/package.json new file mode 100644 index 0000000..8860bc2 --- /dev/null +++ b/app/components/Info/TermsOfService/package.json @@ -0,0 +1,23 @@ +{ + "name": "termsofservice", + "version": "0.0.0", + "private": true, + "main": "./index.tsx", + "author": { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + "contributors": [ + { + "name": "Don Strawsburg", + "email": "don@goforward.group", + "url": "https://goforward.group/" + }, + { + "name": "Sean Strawsburg", + "email": "sean@goforward.group", + "url": "https://goforward.group/" + } + ] +} \ No newline at end of file diff --git a/app/components/Info/TermsOfService/styles.module.css b/app/components/Info/TermsOfService/styles.module.css new file mode 100644 index 0000000..e69de29 diff --git a/components/SignIn/index.tsx b/app/components/SignIn/index.tsx similarity index 100% rename from components/SignIn/index.tsx rename to app/components/SignIn/index.tsx diff --git a/components/SignIn/package.json b/app/components/SignIn/package.json similarity index 100% rename from components/SignIn/package.json rename to app/components/SignIn/package.json diff --git a/components/SignIn/styles.module.css b/app/components/SignIn/styles.module.css similarity index 100% rename from components/SignIn/styles.module.css rename to app/components/SignIn/styles.module.css diff --git a/app/lib/client.ts b/app/lib/client.ts new file mode 100644 index 0000000..107264a --- /dev/null +++ b/app/lib/client.ts @@ -0,0 +1,5 @@ +import { PrismaClient } from '@prisma/client' + +let prisma = new PrismaClient() + +export default prisma \ No newline at end of file diff --git a/lib/constants.ts b/app/lib/constants.ts similarity index 100% rename from lib/constants.ts rename to app/lib/constants.ts diff --git a/lib/linkList/infoLinks.js b/app/lib/linkList/infoLinks.js similarity index 100% rename from lib/linkList/infoLinks.js rename to app/lib/linkList/infoLinks.js diff --git a/lib/linkList/sectionLinks.js b/app/lib/linkList/sectionLinks.js similarity index 100% rename from lib/linkList/sectionLinks.js rename to app/lib/linkList/sectionLinks.js diff --git a/app/lib/script.ts b/app/lib/script.ts new file mode 100644 index 0000000..04cfb4b --- /dev/null +++ b/app/lib/script.ts @@ -0,0 +1,17 @@ +import { PrismaClient } from '@prisma/client' + +const prisma = new PrismaClient() + +async function main() { + // ... you will write your Prisma Client queries here +} + +main() + .then(async () => { + await prisma.$disconnect() + }) + .catch(async (e) => { + console.error(e) + await prisma.$disconnect() + process.exit(1) + }) \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 9007252..dd57056 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -20,7 +20,7 @@ export default function Home() { . -
  • Save and see your changes instantly.
  • +
  • Save and see your changes instantly!
  • diff --git a/package-lock.json b/package-lock.json index 88eb282..15186fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,20 +16,23 @@ "@mui/styles": "^6.1.7", "@mui/system": "^6.1.7", "@mui/x-data-grid": "^7.22.2", + "@prisma/client": "^5.22.0", "fontsource-roboto": "^4.0.0", "next": "15.0.3", "react": "18.2.0", "react-dom": "18.2.0" }, "devDependencies": { - "@types/node": "^20", + "@types/node": "^20.17.6", "@types/react": "^18", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "15.0.3", "postcss": "^8", + "prisma": "^5.22.0", "tailwindcss": "^3.4.1", - "typescript": "^5" + "tsx": "^4.19.2", + "typescript": "^5.6.3" } }, "node_modules/@alloc/quick-lru": { @@ -317,6 +320,390 @@ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==" }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", @@ -1642,6 +2029,68 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@prisma/client": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.22.0.tgz", + "integrity": "sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==", + "hasInstallScript": true, + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.22.0.tgz", + "integrity": "sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==", + "devOptional": 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, + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "5.22.0", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/engines-version": { + "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 + }, + "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, + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/get-platform": { + "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, + "dependencies": { + "@prisma/debug": "5.22.0" + } + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -2909,6 +3358,45 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -5218,6 +5706,25 @@ "node": ">= 0.8.0" } }, + "node_modules/prisma": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.22.0.tgz", + "integrity": "sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==", + "devOptional": true, + "hasInstallScript": true, + "dependencies": { + "@prisma/engines": "5.22.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -6113,6 +6620,25 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, + "node_modules/tsx": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", + "dev": true, + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 7e69353..394eb62 100644 --- a/package.json +++ b/package.json @@ -17,19 +17,22 @@ "@mui/styles": "^6.1.7", "@mui/system": "^6.1.7", "@mui/x-data-grid": "^7.22.2", + "@prisma/client": "^5.22.0", "fontsource-roboto": "^4.0.0", "next": "15.0.3", "react": "18.2.0", "react-dom": "18.2.0" }, "devDependencies": { - "@types/node": "^20", + "@types/node": "^20.17.6", "@types/react": "^18", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "15.0.3", "postcss": "^8", + "prisma": "^5.22.0", "tailwindcss": "^3.4.1", - "typescript": "^5" + "tsx": "^4.19.2", + "typescript": "^5.6.3" } } diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..4cfe300 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,122 @@ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model Post { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + updatedAt DateTime + title String? + content String? + published Boolean @default(false) + authorId Int + User User @relation(fields: [authorId], references: [id]) + + @@index([id]) +} + +model Profile { + id Int @id @default(autoincrement()) + bio String? + userId Int @unique + User User @relation(fields: [userId], references: [id]) + + @@index([id]) +} + +model User { + id Int @id @default(autoincrement()) + email String @unique + name String? + Post Post[] + Profile Profile? + + @@index([id]) +} + +model lipseycatalog { + id Int @id @default(autoincrement()) + itemno String @db.VarChar(20) + description1 String? + description2 String? + upc String? @db.VarChar(20) + manufacturermodelno String? @db.VarChar(30) + msrp Float? + model String? + calibergauge String? + manufacturer String? + type String? + action String? + barrellength String? + capacity String? + finish String? + overalllength String? + receiver String? + safety String? + sights String? + stockframegrips String? + magazine String? + weight String? + imagename String? + chamber String? + drilledandtapped String? + rateoftwist String? + itemtype String? + additionalfeature1 String? + additionalfeature2 String? + additionalfeature3 String? + shippingweight String? + boundbookmanufacturer String? + boundbookmodel String? + boundbooktype String? + nfathreadpattern String? + nfaattachmentmethod String? + nfabaffletype String? + silencercanbedisassembled String? + silencerconstructionmaterial String? + nfadbreduction String? + silenceroutsidediameter String? + nfaform3caliber String? + opticmagnification String? + maintubesize String? + adjustableobjective String? + objectivesize String? + opticadjustments String? + illuminatedreticle String? + reticle String? + exclusive String? + quantity String? @db.VarChar(10) + allocated String? + onsale String? + price Float? + currentprice Float? + retailmap Float? + fflrequired String? + sotrequired String? + exclusivetype String? + scopecoverincluded String? + special String? + sightstype String? + case String? + choke String? + dbreduction String? + family String? + finishtype String? + frame String? + griptype String? @db.VarChar(30) + handgunslidematerial String? + countryoforigin String? @db.VarChar(4) + itemlength String? + itemwidth String? + itemheight String? + packagelength Float? + packagewidth Float? + packageheight Float? + itemgroup String? @db.VarChar(40) + createdon DateTime? @db.Timestamp(6) +} diff --git a/tsconfig.json b/tsconfig.json index d8b9323..0696bdd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,8 +19,30 @@ } ], "paths": { - "@/*": ["./*"] - } + "@/*": ["./*"], + "@/components/*": [ + "./app/components/*" + ], + "@/layouts/*": [ + "./app/components/layouts/*" + ], + "@/fragments/*": [ + "./app/Fragments/*" + ], + "@/lib/*": [ + "./app/lib/*" + ], + "@/scss/*": [ + "./scss/*" + ], + "@/admin/*": [ + "./app/components/Admin/*" + ], + "@/products/*": [ + "./app/components/Products/*" + ] + }, + }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"]