Skip to content

Commit edaa55d

Browse files
author
Power Interview
authored
Merge pull request #2 from PowerInterviewAI/alpha/task1
Alpha/task1 - Initial Project Setup
2 parents a07f58e + ddeeab6 commit edaa55d

49 files changed

Lines changed: 4074 additions & 4512 deletions

Some content is hidden

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

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# API Configuration
2+
VITE_API_BASE_URL=https://api.example.com
3+
4+
# Feature Flags
5+
VITE_ENABLE_ANALYTICS=false
6+
7+
# Environment
8+
VITE_ENV=development

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: ./dist
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.*
7-
.yarn/*
8-
!.yarn/patches
9-
!.yarn/plugins
10-
!.yarn/releases
11-
!.yarn/versions
12-
13-
# testing
14-
/coverage
15-
16-
# next.js
17-
/.next/
18-
/out/
19-
20-
# production
21-
/build
22-
23-
# misc
24-
.DS_Store
25-
*.pem
26-
27-
# debug
1+
# Dependencies
2+
node_modules
3+
package-lock.json
4+
pnpm-lock.yaml
5+
yarn.lock
6+
7+
# Build outputs
8+
dist
9+
dist-ssr
10+
build
11+
.vite
12+
*.local
13+
14+
# Environment files
15+
.env
16+
.env.local
17+
.env.production
18+
.env.*.local
19+
20+
# Logs
21+
logs
22+
*.log
2823
npm-debug.log*
2924
yarn-debug.log*
3025
yarn-error.log*
31-
.pnpm-debug.log*
26+
pnpm-debug.log*
27+
lerna-debug.log*
3228

33-
# env files (can opt-in for committing if needed)
34-
.env*
29+
# Editor directories and files
30+
.vscode/*
31+
!.vscode/extensions.json
32+
.idea
33+
.DS_Store
34+
*.suo
35+
*.ntvs*
36+
*.njsproj
37+
*.sln
38+
*.sw?
39+
40+
# Next.js (old)
41+
.next
42+
out
43+
next-env.d.ts
3544

36-
# vercel
37-
.vercel
45+
# Testing
46+
coverage
47+
.nyc_output
3848

39-
# typescript
49+
# Misc
4050
*.tsbuildinfo
41-
next-env.d.ts
51+

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

.prettierignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Dependencies
2+
node_modules
3+
package-lock.json
4+
pnpm-lock.yaml
5+
yarn.lock
6+
7+
# Build outputs
8+
dist
9+
build
10+
.vite
11+
12+
# Environment files
13+
.env
14+
.env.local
15+
.env.production
16+
17+
# IDE
18+
.vscode
19+
.idea
20+
21+
# OS
22+
.DS_Store
23+
Thumbs.db

.prettierrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"arrowParens": "always",
9+
"endOfLine": "lf",
10+
"plugins": [
11+
"@trivago/prettier-plugin-sort-imports",
12+
"prettier-plugin-tailwindcss"
13+
],
14+
"importOrder": [
15+
"^react$",
16+
"^react-dom$",
17+
"<THIRD_PARTY_MODULES>",
18+
"^@/(.*)$",
19+
"^[./]"
20+
],
21+
"importOrderSeparation": true,
22+
"importOrderSortSpecifiers": true
23+
}

DEPLOYMENT.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Deployment Guide
2+
3+
## GitHub Pages Deployment
4+
5+
This project is configured for automatic deployment to GitHub Pages using GitHub Actions.
6+
7+
### Prerequisites
8+
9+
1. A GitHub repository for this project
10+
2. GitHub Pages enabled in repository settings
11+
12+
### Setup Steps
13+
14+
1. **Push your code to GitHub:**
15+
16+
```bash
17+
git init
18+
git add .
19+
git commit -m "Initial commit: Vite + React + TypeScript setup"
20+
git branch -M main
21+
git remote add origin https://github.com/yourusername/power-interview-hero.git
22+
git push -u origin main
23+
```
24+
25+
2. **Enable GitHub Pages:**
26+
- Go to your repository on GitHub
27+
- Navigate to Settings → Pages
28+
- Under "Build and deployment", select "GitHub Actions" as the source
29+
30+
3. **Update base URL in vite.config.ts:**
31+
- Change the `base` property to match your repository name:
32+
```typescript
33+
base: '/your-repo-name/';
34+
```
35+
36+
4. **Automatic Deployment:**
37+
- The GitHub Actions workflow will automatically trigger on pushes to the `main` branch
38+
- Check the "Actions" tab in your GitHub repository to monitor deployment progress
39+
- Once complete, your site will be available at: `https://yourusername.github.io/your-repo-name/`
40+
41+
### Manual Deployment
42+
43+
If you prefer manual deployment:
44+
45+
1. Build the project:
46+
47+
```bash
48+
npm run build
49+
```
50+
51+
2. Deploy the `dist` folder to your hosting service
52+
53+
### Environment Variables
54+
55+
For production deployments, you can set environment variables:
56+
57+
1. Create a `.env.production` file (not committed to git)
58+
2. Add your production environment variables:
59+
```
60+
VITE_API_BASE_URL=https://production-api.example.com
61+
VITE_ENABLE_ANALYTICS=true
62+
```
63+
64+
### Custom Domain (Optional)
65+
66+
To use a custom domain with GitHub Pages:
67+
68+
1. Add a `CNAME` file to the `public` folder with your domain name
69+
2. Configure your DNS provider to point to GitHub Pages
70+
3. Enable "Enforce HTTPS" in GitHub Pages settings
71+
72+
## Other Hosting Options
73+
74+
### Vercel
75+
76+
```bash
77+
npm install -g vercel
78+
vercel
79+
```
80+
81+
### Netlify
82+
83+
```bash
84+
npm install -g netlify-cli
85+
netlify deploy --prod
86+
```
87+
88+
### Traditional Web Server
89+
90+
Simply upload the contents of the `dist` folder to your web server's public directory.

0 commit comments

Comments
 (0)