Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"printWidth": 100,
"arrayExpand": true
Comment on lines +6 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: "arrayExpand" is non-standard. Verify if supported or necessary.

Suggested change
"printWidth": 100,
"arrayExpand": true
"printWidth": 100

}
47 changes: 47 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# # Build stage
# FROM node:16 as build-stage
# WORKDIR /app
# COPY package*.json ./
# RUN yarn
# COPY . .
# RUN yarn build

# # Production stage
# FROM nginx:stable-alpine as production-stage
# COPY --from=build-stage /app/dist /usr/share/nginx/html
# COPY nginx.conf /etc/nginx/conf.d/default.conf

# # Create a startup script
# RUN echo '#!/bin/sh' > /docker-entrypoint.d/00-update-port.sh && \
# echo 'sed -i "s/listen 8080/listen $PORT/g" /etc/nginx/conf.d/default.conf' >> /docker-entrypoint.d/00-update-port.sh && \
# chmod +x /docker-entrypoint.d/00-update-port.sh

# EXPOSE 8080
# CMD ["nginx", "-g", "daemon off;"]
Comment on lines +1 to +20

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile contains commented-out code at the top that duplicates the actual implementation, and redundant commented EXPOSE and CMD directives at the bottom that should be removed.

Comment on lines +1 to +20
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove legacy commented-out build/stage code for clarity.

Suggested change
# # Build stage
# FROM node:16 as build-stage
# WORKDIR /app
# COPY package*.json ./
# RUN yarn
# COPY . .
# RUN yarn build
# # Production stage
# FROM nginx:stable-alpine as production-stage
# COPY --from=build-stage /app/dist /usr/share/nginx/html
# COPY nginx.conf /etc/nginx/conf.d/default.conf
# # Create a startup script
# RUN echo '#!/bin/sh' > /docker-entrypoint.d/00-update-port.sh && \
# echo 'sed -i "s/listen 8080/listen $PORT/g" /etc/nginx/conf.d/default.conf' >> /docker-entrypoint.d/00-update-port.sh && \
# chmod +x /docker-entrypoint.d/00-update-port.sh
# EXPOSE 8080
# CMD ["nginx", "-g", "daemon off;"]


# Build stage
FROM node:16 as build-stage
WORKDIR /app
COPY package*.json ./
RUN yarn
COPY . .
RUN yarn build

# Production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Add a startup script for debugging
RUN echo '#!/bin/sh' > /start.sh && \
echo 'echo "Starting nginx with PORT=$PORT"' >> /start.sh && \
echo 'cat /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'nginx -g "daemon off;"' >> /start.sh && \
chmod +x /start.sh
Comment on lines +36 to +40
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Update the startup script to modify the nginx configuration with sed so that the dynamic port is applied. [possible bug]

Suggested change
RUN echo '#!/bin/sh' > /start.sh && \
echo 'echo "Starting nginx with PORT=$PORT"' >> /start.sh && \
echo 'cat /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'nginx -g "daemon off;"' >> /start.sh && \
chmod +x /start.sh
RUN echo '#!/bin/sh' > /start.sh && \
echo 'sed -i "s/listen 8080/listen $PORT/g" /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'echo "Starting nginx with PORT=$PORT"' >> /start.sh && \
echo 'cat /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'nginx -g "daemon off;"' >> /start.sh && \
chmod +x /start.sh

Comment on lines +35 to +40

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startup script doesn't dynamically update the nginx configuration to use the $PORT environment variable, which was the intention in the commented-out version.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
# Add a startup script for debugging
RUN echo '#!/bin/sh' > /start.sh && \
echo 'echo "Starting nginx with PORT=$PORT"' >> /start.sh && \
echo 'cat /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'nginx -g "daemon off;"' >> /start.sh && \
chmod +x /start.sh
# Add a startup script for dynamic port configuration
RUN echo '#!/bin/sh' > /start.sh && \
echo 'echo "Starting nginx with PORT=$PORT"' >> /start.sh && \
echo 'sed -i "s/listen 8080/listen $PORT/g" /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'cat /etc/nginx/conf.d/default.conf' >> /start.sh && \
echo 'nginx -g "daemon off;"' >> /start.sh && \
chmod +x /start.sh


EXPOSE 8080
CMD ["/start.sh"]

# EXPOSE 8080

# CMD ["nginx", "-g", "daemon off;"]
47 changes: 20 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
# {{ Project Name }}
# auth-app

{{ Brief description of the project }}
## Project setup
```
yarn install
```

## Overview
This repository is created from Ollion's standard template to ensure best practices.
### Compiles and hot-reloads for development
```
yarn serve
```

## Installation
{{ Instructions on how to install the project }}
### Compiles and minifies for production
```
yarn build
```

## Usage
{{ How to use the project }}
### Lints and fixes files
```
yarn lint
```

## Using this Template
1. When creating a new repository on GitHub, select "Choose a template" and pick `ollionorg/private-repository-creation` from the list.
2. Enter your repository name (e.g., "my-new-repository").
3. Set visibility to "Private".
4. Do not check "Include all branches".
5. Click "Create repository.

## Post-Creation Setup
- After creating your repository from private-repository-creation template, you can enable branch protection for the `main` branch by manually triggering the included workflow:
- Go to the **Actions** tab, select **Set Branch Protection**, and click **Run workflow** > **Run workflow** to apply the protection rules, which are configured by the workflow.
- After the workflow completes successfully, verify in **Settings** > **Branches** that `main` has:
- Pull request required (1 approval)
- Conversation resolution required
- Signed commits required
- Customize this README: Replace `[Project Name]`, `[Brief description of the project]`, and update `Installation` and `Usage` sections as needed. Modify other files if required.

## Note: GPG Signing and Repository Creation
- The branch protection rules mandate commit signatures. Set up GPG signing in your Git client by following this [Confluence guide](https://ollion.atlassian.net/wiki/spaces/CID/pages/2989687222/Signed+Commits+on+Github).
- For detailed instructions on creating a repository with this template, refer to this [Confluence guide](https://ollion.atlassian.net/wiki/spaces/CID/pages/4123131980/Github+Repository+creation+using+template).
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/VivekY1098/Auth-app?utm_source=oss&utm_medium=github&utm_campaign=VivekY1098%2FAuth-app&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
};
15 changes: 15 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
server {
listen 8080 default_server;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}

# Additional helpful configurations
gzip on;
gzip_types text/plain text/css application/json application/javascript;
client_max_body_size 10M;
}
59 changes: 59 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "auth-app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"axios": "^1.7.9",
"core-js": "^3.8.3",
Comment on lines +13 to +14
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Upgrade axios ‑ current version is flagged as vulnerable (CVE‑2025‑27152).

Your dependencies still pin axios to ^1.7.9, but the PR description explicitly calls out the SSRF / credential‑leak vulnerability fixed in 1.8.2. Ship with the patched version before deploying.

-    "axios": "^1.7.9",
+    "axios": "^1.8.2",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"axios": "^1.7.9",
"core-js": "^3.8.3",
"axios": "^1.8.2",
"core-js": "^3.8.3",

"pinia": "^3.0.1",
"vue": "^3.2.13",
"vue-router": "^4.0.3",
"vuex": "^4.0.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-typescript": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-typescript": "^9.1.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.0.3",
"prettier": "^2.4.1",
"typescript": "~4.5.5"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2020
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}
Loading