Skip to content

Commit 3f84f61

Browse files
Merge pull request #1 from NebraskaCoder/develop
chore(merge): develop -> main
2 parents 3e5fa06 + 17f2cf3 commit 3f84f61

42 files changed

Lines changed: 51397 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
2+
ARG VARIANT=16-bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
4+
5+
# Install MongoDB command line tools if on buster and x86_64 (arm64 not supported)
6+
ARG MONGO_TOOLS_VERSION=5.0
7+
RUN . /etc/os-release \
8+
&& if [ "${VERSION_CODENAME}" = "buster" ] && [ "$(dpkg --print-architecture)" = "amd64" ]; then \
9+
curl -sSL "https://www.mongodb.org/static/pgp/server-${MONGO_TOOLS_VERSION}.asc" | gpg --dearmor > /usr/share/keyrings/mongodb-archive-keyring.gpg \
10+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] http://repo.mongodb.org/apt/debian $(lsb_release -cs)/mongodb-org/${MONGO_TOOLS_VERSION} main" | tee /etc/apt/sources.list.d/mongodb-org-${MONGO_TOOLS_VERSION}.list \
11+
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
12+
&& apt-get install -y mongodb-database-tools mongodb-mongosh \
13+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*; \
14+
fi
15+
16+
# [Optional] Uncomment this section to install additional OS packages.
17+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
18+
&& apt-get -y install --no-install-recommends vim bash-completion
19+
20+
# [Optional] Uncomment if you want to install an additional version of node using nvm
21+
# ARG EXTRA_NODE_VERSION=10
22+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
23+
24+
# [Optional] Uncomment if you want to install more global node modules
25+
# RUN su node -c "npm install -g <your-package-list-here>"
26+
27+
28+

.devcontainer/devcontainer.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.236.0/containers/javascript-node-mongo
3+
// Update the VARIANT arg in docker-compose.yml to pick a Node.js version
4+
{
5+
"name": "NebraskaCoder.com",
6+
"dockerComposeFile": "docker-compose.yml",
7+
"service": "app",
8+
"workspaceFolder": "/workspace",
9+
10+
// Configure tool-specific properties.
11+
"customizations": {
12+
// Configure properties specific to VS Code.
13+
"vscode": {
14+
"settings": {
15+
"[javascript]": {
16+
"editor.defaultFormatter": "esbenp.prettier-vscode"
17+
},
18+
"workbench.iconTheme": "vscode-icons",
19+
"[typescript]": {
20+
"editor.defaultFormatter": "esbenp.prettier-vscode"
21+
},
22+
"editor.defaultFormatter": "esbenp.prettier-vscode",
23+
"vsicons.dontShowNewVersionMessage": true,
24+
"git.autofetch": true,
25+
"git.confirmSync": false,
26+
"files.associations": {
27+
"*.env.*": "env",
28+
"*.env.development": "env",
29+
"*.env.test": "env",
30+
"*.env.production": "env",
31+
"*.env.local": "env",
32+
"*.env.*.local": "env"
33+
},
34+
"git.suggestSmartCommit": false
35+
},
36+
"extensions": [
37+
"dbaeumer.vscode-eslint",
38+
"esbenp.prettier-vscode",
39+
"irongeek.vscode-env",
40+
"github.vscode-pull-request-github",
41+
"ecmel.vscode-html-css",
42+
"zignd.html-css-class-completion",
43+
"bradlc.vscode-tailwindcss",
44+
"austenc.tailwind-docs",
45+
"mongodb.mongodb-vscode",
46+
"orta.vscode-jest"
47+
]
48+
}
49+
},
50+
51+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
52+
"forwardPorts": [27017],
53+
54+
// Use 'postCreateCommand' to run commands after the container is created.
55+
// "postCreateCommand": "npm install",
56+
57+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
58+
"remoteUser": "node",
59+
"features": {
60+
"kubectl-helm-minikube": "latest",
61+
"terraform": "latest",
62+
"git": "os-provided",
63+
"github-cli": "latest",
64+
"homebrew": "latest",
65+
"python": "latest"
66+
}
67+
}

.devcontainer/docker-compose.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: "3.8"
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
args:
9+
# Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14.
10+
# Append -bullseye or -buster to pin to an OS version.
11+
# Use -bullseye variants on local arm64/Apple Silicon.
12+
VARIANT: 18-bullseye
13+
volumes:
14+
- ..:/workspace:cached
15+
16+
# Overrides default command so things don't shut down after the process ends.
17+
command: sleep infinity
18+
19+
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
20+
network_mode: service:db
21+
# Uncomment the next line to use a non-root user for all processes.
22+
# user: node
23+
24+
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
25+
# (Adding the "ports" property to this file will not forward from a Codespace.)
26+
27+
db:
28+
image: mongo:latest
29+
restart: unless-stopped
30+
volumes:
31+
- mongodb-data:/data/db
32+
# Uncomment to change startup options
33+
environment:
34+
MONGO_INITDB_ROOT_USERNAME: root
35+
MONGO_INITDB_ROOT_PASSWORD: devonly
36+
MONGO_INITDB_DATABASE: nebraskacoder
37+
38+
# Add "forwardPorts": ["27017"] to **devcontainer.json** to forward MongoDB locally.
39+
# (Adding the "ports" property to this file will not forward from a Codespace.)
40+
41+
volumes:
42+
mongodb-data: null

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo

.storybook/main.ts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// @ts-ignore
2+
3+
const path = require("path");
4+
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
5+
6+
module.exports = {
7+
stories: [
8+
"../stories/**/*.stories.mdx",
9+
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
10+
"../__stories__/**/*.stories.mdx",
11+
"../__stories__/**/*.stories.@(js|jsx|ts|tsx)",
12+
"../(components)/**/__stories__/*.stories.mdx",
13+
"../(components)/**/__stories__/*.stories.@(js|jsx|ts|tsx)",
14+
],
15+
addons: [
16+
{
17+
name: "@storybook/addon-postcss",
18+
options: {
19+
postcssLoaderOptions: {
20+
implementation: require("postcss"),
21+
},
22+
},
23+
},
24+
"@storybook/addon-links",
25+
"@storybook/addon-essentials",
26+
"@storybook/addon-actions",
27+
"@storybook/addon-interactions",
28+
],
29+
framework: "@storybook/react",
30+
core: {
31+
builder: "@storybook/builder-webpack5",
32+
},
33+
webpackFinal: async (config: any) => {
34+
config.resolve.plugins = [
35+
...(config.resolve.plugins || []),
36+
new TsconfigPathsPlugin({
37+
extensions: config.resolve.extensions,
38+
}),
39+
];
40+
config.module.rules.push({
41+
test: /\,css&/,
42+
use: [
43+
{
44+
loader: "postcss-loader",
45+
options: {
46+
ident: "postcss",
47+
plugins: [require("tailwindcss"), require("autoprefixer")],
48+
},
49+
},
50+
],
51+
include: path.resolve(__dirname, "../"),
52+
});
53+
return config;
54+
},
55+
};

.storybook/preview.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// @ts-ignore
2+
require("@styles/globals.css");
3+
4+
module.exports = {
5+
parameters: {
6+
actions: { argTypesRegex: "^on[A-Z].*" },
7+
controls: {
8+
matchers: {
9+
color: /(background|color)$/i,
10+
date: /Date$/,
11+
},
12+
},
13+
},
14+
};

.storybook/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ".."
3+
}

.vscode/launch.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Full Stack",
6+
"type": "node-terminal",
7+
"request": "launch",
8+
"command": "npm run dev",
9+
"serverReadyAction": {
10+
"pattern": "started server on .+, url: (https?://.+)",
11+
"uriFormat": "%s",
12+
"action": "debugWithChrome"
13+
}
14+
},
15+
{
16+
"name": "Storybook Full Stack",
17+
"type": "node-terminal",
18+
"request": "launch",
19+
"command": "npm run storybook:noweb",
20+
"serverReadyAction": {
21+
"pattern": "Local: .+(https?://.+)/",
22+
"uriFormat": "%s",
23+
"action": "debugWithChrome"
24+
}
25+
},
26+
{
27+
"name": "Server-Side",
28+
"type": "node-terminal",
29+
"request": "launch",
30+
"command": "npm run dev"
31+
},
32+
{
33+
"name": "Client-Side",
34+
"type": "pwa-chrome",
35+
"request": "launch",
36+
"url": "http://localhost:3000"
37+
},
38+
{
39+
"name": "Storybook Server-Side",
40+
"type": "node-terminal",
41+
"request": "launch",
42+
"command": "npm run storybook"
43+
},
44+
{
45+
"name": "Storybook Client-Side",
46+
"type": "pwa-chrome",
47+
"request": "launch",
48+
"url": "http://localhost:6006"
49+
}
50+
]
51+
}

__stories__/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Stories for Pages
2+
3+
This folder contains the Storybook stories for pages.

0 commit comments

Comments
 (0)