-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from HoseaCodes/main
Article Updates
- Loading branch information
Showing
197 changed files
with
34,486 additions
and
45,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Ignore node_modules directory for Node.js projects | ||
node_modules | ||
|
||
# Ignore any development dependencies installed globally | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Ignore any local environment files | ||
.env | ||
|
||
# Ignore any log files | ||
logs | ||
|
||
# Ignore any build artifacts | ||
build | ||
dist | ||
|
||
# Ignore any temporary files | ||
*.tmp | ||
*.temp | ||
*.swp | ||
|
||
# Ignore any editor-specific files or directories | ||
.vscode | ||
.idea | ||
|
||
# Ignore any Docker-related files | ||
.dockerignore | ||
.docker | ||
.dockerignore.example | ||
|
||
# Ignore any git-related files | ||
.git | ||
.gitignore | ||
|
||
# Ignore any macOS-specific files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SKIP_PREFLIGHT_CHECK= | ||
MONGODB_URL= | ||
FOREMAPI= | ||
MEDIUMAPI= | ||
MEDIUMUSER= | ||
ACCESS_TOKEN_SECRET= | ||
REFRESH_TOKEN_SECRET= | ||
CLOUD_API_KEY= | ||
CLOUD_API_SECRET= | ||
CLOUND_NAME= | ||
REACT_APP_VITE_Open_AI_Key= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"rules": { | ||
"padded-blocks": "off" | ||
}, | ||
// "extends": ["airbnb-base", "eslint:recommended", "plugin:react/recommended"] | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Dev Pipeline | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
static-scan: | ||
runs-on: ubuntu-latest | ||
env: | ||
JSON_OUTPUT: snyk-static-scan.json | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: snyk/actions/setup@master | ||
- uses: actions/setup-go@v1 | ||
- name: Run Snyk to check for vulnerabilities | ||
continue-on-error: true | ||
run: | | ||
snyk code test | ||
snyk-to-html -i $JSON_OUTPUT -o snyk.html | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
- name: Archive snyk results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: snyk-report | ||
path: output/scan/snyk.html | ||
retention-days: 5 | ||
dependency-scan: | ||
runs-on: ubuntu-latest | ||
env: | ||
JSON_OUTPUT: snyk-dependency-scan.json | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: snyk/actions/setup@master | ||
- uses: actions/setup-go@v1 | ||
- name: Run Snyk to check for vulnerabilities | ||
continue-on-error: true | ||
run: | | ||
snyk test | ||
snyk-to-html -i $JSON_OUTPUT -o snyk.html | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
- name: Archive snyk results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: snyk-report | ||
path: output/scan/snyk.html | ||
retention-days: 5 | ||
lint: | ||
needs: [static-scan, dependency-scan] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm i --legacy-peer-deps | ||
- name: lint | ||
continue-on-error: true | ||
run: npm run lint | ||
build: | ||
needs: [static-scan, dependency-scan, lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
- name: Install Dependencies | ||
run: npm install --legacy-peer-deps | ||
- name: Deploy to Heroku | ||
run: | | ||
git remote add heroku https://git.heroku.com/hoseacodes-dev.git | ||
git push heroku main | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Snyk Scan | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
security: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/node@master | ||
continue-on-error: true | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
command: monitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,7 @@ test/db.js | |
src/.eslintrc.js | ||
|
||
.env-cmdrc | ||
|
||
test/coverage | ||
|
||
animation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Use the official Node.js 14 image as base | ||
FROM node:20 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /usr/src/app | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install --legacy-peer-deps | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Build the React app | ||
RUN npm run build | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|
||
# Set environment variables from .env file | ||
ARG NODE_ENV=production | ||
ENV NODE_ENV=${NODE_ENV} | ||
|
||
# Copy .env file to the working directory | ||
COPY .env . | ||
|
||
# Run the backend server | ||
CMD ["node", "server.js"] |
Oops, something went wrong.