Skip to content

add vercel server as mvp#11

Merged
kubrickcode merged 3 commits into
mainfrom
develop/shlee/9
Oct 6, 2025
Merged

add vercel server as mvp#11
kubrickcode merged 3 commits into
mainfrom
develop/shlee/9

Conversation

@kubrickcode
Copy link
Copy Markdown
Owner

@kubrickcode kubrickcode commented Oct 6, 2025

fix #9

@kubrickcode kubrickcode marked this pull request as ready for review October 6, 2025 14:37
@kubrickcode
Copy link
Copy Markdown
Owner Author

/gemini review

@kubrickcode kubrickcode merged commit a27bf51 into main Oct 6, 2025
7 checks passed
@kubrickcode kubrickcode deleted the develop/shlee/9 branch October 6, 2025 14:38
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a Vercel server as an MVP, including a basic API endpoint and necessary configuration files. The changes are a good starting point. My review includes suggestions to improve code quality and adhere to the repository's style guide, mainly focusing on alphabetical sorting of properties in JSON files and avoiding magic numbers in the TypeScript code. Following these suggestions will enhance consistency and maintainability.

Comment thread server/api/hello.ts
Comment on lines +3 to +8
export default async (request: VercelRequest, response: VercelResponse) => {
return response.status(200).json({
message: "Hello from GitHub Project Status Viewer API",
timestamp: new Date().toISOString(),
});
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The function body can be improved for readability and maintainability by extracting hardcoded values into constants. This adheres to the style guide's rule against magic numbers and strings.1

Additionally, since the request parameter is not used, it's a good practice to rename it to _ to signify that it's intentionally unused.

Suggested change
export default async (request: VercelRequest, response: VercelResponse) => {
return response.status(200).json({
message: "Hello from GitHub Project Status Viewer API",
timestamp: new Date().toISOString(),
});
};
export default async (_: VercelRequest, response: VercelResponse) => {
const STATUS_OK = 200;
const HELLO_MESSAGE = "Hello from GitHub Project Status Viewer API";
return response.status(STATUS_OK).json({
message: HELLO_MESSAGE,
timestamp: new Date().toISOString(),
});
};

Style Guide References

Footnotes

  1. The style guide recommends separating variable values into constants to avoid magic numbers. (link)

Comment thread server/package.json
Comment on lines +2 to +14
"name": "github-project-status-viewer-server",
"version": "1.0.0",
"description": "Serverless API for GitHub OAuth authentication",
"main": "api/hello.ts",
"scripts": {},
"dependencies": {
"@vercel/node": "5.3.24",
"vercel": "48.2.0"
},
"devDependencies": {
"@types/node": "24.7.0",
"typescript": "5.9.3"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The properties in package.json are not sorted alphabetically. According to the style guide, object properties should be sorted alphabetically for consistency and readability.1

Suggested change
"name": "github-project-status-viewer-server",
"version": "1.0.0",
"description": "Serverless API for GitHub OAuth authentication",
"main": "api/hello.ts",
"scripts": {},
"dependencies": {
"@vercel/node": "5.3.24",
"vercel": "48.2.0"
},
"devDependencies": {
"@types/node": "24.7.0",
"typescript": "5.9.3"
}
"dependencies": {
"@vercel/node": "5.3.24",
"vercel": "48.2.0"
},
"description": "Serverless API for GitHub OAuth authentication",
"devDependencies": {
"@types/node": "24.7.0",
"typescript": "5.9.3"
},
"main": "api/hello.ts",
"name": "github-project-status-viewer-server",
"scripts": {},
"version": "1.0.0"

Style Guide References

Footnotes

  1. The style guide requires object properties to be sorted alphabetically whenever possible. (link)

Comment thread server/tsconfig.json
Comment on lines +3 to +12
"target": "ES2020",
"module": "commonjs",
"lib": ["ES2020"],
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"outDir": ".vercel/output"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The properties in compilerOptions are not sorted alphabetically. The style guide recommends sorting object properties to improve consistency and readability.1

    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "lib": [
      "ES2020"
    ],
    "module": "commonjs",
    "moduleResolution": "node",
    "outDir": ".vercel/output",
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true,
    "target": "ES2020"

Style Guide References

Footnotes

  1. The style guide requires object properties to be sorted alphabetically whenever possible. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching from PAT storage to Github OAuth App

1 participant