Skip to content

Commit 8bcb199

Browse files
committed
2 parents c704b26 + e3e083a commit 8bcb199

Some content is hidden

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

91 files changed

+14190
-6
lines changed

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature
3+
about: Suggest an idea for this project
4+
title: "[Feature] <FEATURE_NAME>"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Description
11+
*A clear and concise description of what you want to happen.*
12+
13+
Related backlog codes
14+
- *M1FR1*
15+
16+
Other Notes:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Commit workflow
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, macos-latest, windows-latest]
10+
node-version: [20.x]
11+
runs-on: ${{ matrix.os }}
12+
defaults:
13+
run:
14+
working-directory: ./frontend/peerprep
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: npm ci
21+
- run: npm run lint
22+
- run: npm run build

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1+
# Virtual environments
2+
**/venv/
3+
4+
.pytest_cache/
15
**/__pycache__/
6+
7+
# Ignore environment variables file
8+
.env
9+
10+
# Ignore service account key file
11+
services/**/serviceAccountKey.json
12+
13+
# Ignore node modules
14+
**/node_modules/
15+
.vscode/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
### Note:
55
- You are required to develop individual microservices within separate folders within this repository.
66
- The teaching team should be given access to the repositories as we may require viewing the history of the repository in case of any disputes or disagreements.
7+
8+
9+
### for user-service
10+
- go to firebase project settings > service account > generate new private key.
11+
- rename the downloaded json file into serviceAccountKey.json and paste it the same dir as .env.

frontend/peerprep/.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.react-router
2+
build
3+
node_modules
4+
README.md

frontend/peerprep/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Frontend specific ignores
2+
# dependencies
3+
/node_modules
4+
5+
# build output
6+
/build
7+
/dist
8+
9+
# dotenv files
10+
.env
11+
.env.local
12+
13+
# logs
14+
npm-debug.log*
15+
yarn-error.log*
16+
17+
# Mac
18+
.DS_Store
19+
20+
# editor and IDE files
21+
.vscode/
22+
*.swp
23+
24+
# React Router
25+
/.react-router/
26+
/build/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hash": "61c1135b",
3+
"configHash": "bf99f7f0",
4+
"lockfileHash": "d435eb2c",
5+
"browserHash": "4f32ab05",
6+
"optimized": {},
7+
"chunks": {}
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

frontend/peerprep/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM node:20-alpine AS development-dependencies-env
2+
WORKDIR /app
3+
COPY package*.json ./
4+
RUN npm ci
5+
6+
FROM node:20-alpine AS production-dependencies-env
7+
COPY ./package.json package-lock.json /app/
8+
WORKDIR /app
9+
RUN npm ci --omit=dev
10+
11+
FROM node:20-alpine AS build-env
12+
COPY . /app/
13+
COPY --from=development-dependencies-env /app/node_modules /app/node_modules
14+
WORKDIR /app
15+
RUN npm run build
16+
17+
FROM node:20-alpine
18+
COPY ./package.json package-lock.json /app/
19+
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
20+
COPY --from=build-env /app/build /app/build
21+
WORKDIR /app
22+
EXPOSE 3000
23+
CMD ["npm", "start"]

frontend/peerprep/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Welcome to React Router!
2+
3+
A modern, production-ready template for building full-stack React applications using React Router.
4+
5+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router-templates/tree/main/default)
6+
7+
## Features
8+
9+
- 🚀 Server-side rendering
10+
- ⚡️ Hot Module Replacement (HMR)
11+
- 📦 Asset bundling and optimization
12+
- 🔄 Data loading and mutations
13+
- 🔒 TypeScript by default
14+
- 🎉 TailwindCSS for styling
15+
- 📖 [React Router docs](https://reactrouter.com/)
16+
17+
## Getting Started
18+
19+
### Installation
20+
21+
Install the dependencies:
22+
23+
```bash
24+
npm install
25+
```
26+
27+
### Development
28+
29+
Start the development server with HMR:
30+
31+
```bash
32+
npm run dev
33+
```
34+
35+
Your application will be available at `http://localhost:5173`.
36+
37+
## Building for Production
38+
39+
Create a production build:
40+
41+
```bash
42+
npm run build
43+
```
44+
45+
## Deployment
46+
47+
### Docker Deployment
48+
49+
To build and run using Docker:
50+
51+
```bash
52+
docker build -t my-app .
53+
54+
# Run the container
55+
docker run -p 3000:3000 my-app
56+
```
57+
58+
The containerized application can be deployed to any platform that supports Docker, including:
59+
60+
- AWS ECS
61+
- Google Cloud Run
62+
- Azure Container Apps
63+
- Digital Ocean App Platform
64+
- Fly.io
65+
- Railway
66+
67+
### DIY Deployment
68+
69+
If you're familiar with deploying Node applications, the built-in app server is production-ready.
70+
71+
Make sure to deploy the output of `npm run build`
72+
73+
```
74+
├── package.json
75+
├── package-lock.json (or pnpm-lock.yaml, or bun.lockb)
76+
├── build/
77+
│ ├── client/ # Static assets
78+
│ └── server/ # Server-side code
79+
```
80+
81+
### Lint check
82+
To run the lint check:
83+
84+
```bash
85+
npm run lint
86+
```
87+
88+
## Styling
89+
90+
This template comes with [Tailwind CSS](https://tailwindcss.com/) already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
91+
92+
---
93+
94+
Built with ❤️ using React Router.

0 commit comments

Comments
 (0)