diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.gitignore b/.gitignore index 74b7586..ca1b564 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /node_modules /.pnp .pnp.js +.yarn/install-state.gz # testing /coverage @@ -25,11 +26,21 @@ yarn-debug.log* yarn-error.log* # local env files +.env*.local .env -.env.local -.env.development.local -.env.test.local -.env.production.local +.env.* +!.env.example # vercel .vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +# panda css +styled-system + +# JetBrains +.idea +.fleet \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..aacb518 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18.17 diff --git a/.vscode copy/launch.json b/.vscode copy/launch.json new file mode 100644 index 0000000..5ac75f2 --- /dev/null +++ b/.vscode copy/launch.json @@ -0,0 +1,28 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Next.js: debug server-side", + "type": "node-terminal", + "request": "launch", + "command": "pnpm dev" + }, + { + "name": "Next.js: debug client-side", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000" + }, + { + "name": "Next.js: debug full stack", + "type": "node-terminal", + "request": "launch", + "command": "pnpm dev", + "serverReadyAction": { + "pattern": "- Local:.+(https?://.+)", + "uriFormat": "%s", + "action": "debugWithChrome" + } + } + ] +} diff --git a/README.md b/README.md index 75d16b4..c403366 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,36 @@ -# Wedding Website +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). -## This is a skeleton template of the wedding website I created +## Getting Started -Features include: -- Password login for site access -- RSVP page for groups or individuals -- Pages that include: - - Home Page - - Wedding Party - - Photos pages - - Q&A - - Travel information - - RSVP forms +First, run the development server: -## Detailed Info +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` -Names, Dates, Locations are all hardcoded to a value +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -The site implements a basic auth with [next-iron-session](https://github.com/vvo/next-iron-session) to protect access without knowing the password to the site. +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -The code is set up to use a MongoDB instace, ENV MONGO_URL, but this could easily be swapped for any DB. For the purposes of deploying this template for viewing the data is hardcoded. +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. -Use of CSS variables at a Layout level allows for theming and is easily extensible. +## Learn More -Adding, Updating, and Deleting of guests and groups is currently done manually on the DB or on a deployment of the admin specific branch. +To learn more about Next.js, take a look at the following resources: -This admin branch is not included yet in this example site as no roles or permissions have been set up. However, this branch does include additional pages to add, edit, and delete these guests and groups. +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -*If deploying to production please remove all sections that have the following:* -```// TODO: REMOVE THIS WHEN TAKING YOUR SITE TO PRODUCTION``` +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! -## Tech +## Deploy on Vercel -Overall a typical NextJS Application using ReactJS and basic authentication. +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. -### Frontend - -- ReactJS -- Styled Components -- Images - - Loaded using either the default NextJS image with custom blur animation - - Or loading using Cloudinary on NextJS image and custom blur - -### Backend - -- NextJS APIs -- Next Iron Session for Login - - Server side rendering of base pages checking to see if user is logged in - - Requires ENV variable of SECRET_COOKIE_PASSWORD to be set -- Mongoose DB for MongoDB - - Used to store RSVPs and default logins - -## Future Changes -1. On/Off feature for public vs password protected sites -2. Build in auth permissions to allow guest vs admin roles -3. If roles available then add in the admin pages for create, update, and deletion of guests/groups -4. Add more theming options and easy customization of pages, resources, etc. -5. Email reminder option \ No newline at end of file +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/__tests__/Home.test.js b/__tests__/Home.test.js deleted file mode 100644 index 2c2c7b3..0000000 --- a/__tests__/Home.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import HomePage from '../pages'; - -describe('Index Page ', () => { - it('should render', () => { - render(); - }); -}); diff --git a/__tests__/Nav.test.js b/__tests__/Nav.test.js deleted file mode 100644 index 956ee1b..0000000 --- a/__tests__/Nav.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import Nav from '../components/Nav'; - -const useRouter = jest.spyOn(require('next/router'), 'useRouter'); - -describe('