Skip to content

Commit 3ff037c

Browse files
authored
Merge pull request #5 from ChinZJ/feature/user-service
Add core user registration functionality
2 parents a01434f + e05b47a commit 3ff037c

File tree

120 files changed

+19940
-3
lines changed

Some content is hidden

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

120 files changed

+19940
-3
lines changed

.github/workflows/codecov.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run tests and upload coverage
2+
3+
on:
4+
push
5+
6+
jobs:
7+
test:
8+
name: Run tests and collect coverage
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 2
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v4
18+
19+
- name: Install root dependencies
20+
run: npm install
21+
22+
- name: Install workspace dependencies
23+
run: npm install --workspaces
24+
25+
- name: Run tests
26+
run: npx jest --coverage
27+
28+
- name: Upload results to Codecov
29+
uses: codecov/codecov-action@v5
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Node
2+
node_modules/
3+
**/node_modules/
4+
.env
5+
6+
# TypeScript build output
7+
**/dist/

.nvmrc

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

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Node
2+
node_modules/
3+
**/node_modules/

.prettierrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"arrowParens": "avoid",
3+
"bracketSpacing": false,
4+
"bracketSameLine": false,
5+
"endOfLine": "lf",
6+
"jsxBracketSameLine": false,
7+
"jsxSingleQuote": false,
8+
"printWidth": 100,
9+
"proseWrap": "always",
10+
"quoteProps": "as-needed",
11+
"semi": true,
12+
"singleQuote": true,
13+
"tabWidth": 2,
14+
"trailingComma": "es5",
15+
"useTabs": false
16+
}

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
[![codecov](https://codecov.io/gh/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g03/graph/badge.svg?token=H8J2691IYM)](https://codecov.io/gh/CS3219-AY2526Sem1/cs3219-ay2526s1-project-g03)
2+
13
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/QUdQy4ix)
4+
25
# CS3219 Project (PeerPrep) - AY2526S1
6+
37
## Group: Gxx
48

5-
### Note:
6-
- You are required to develop individual microservices within separate folders within this repository.
7-
- 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.
9+
### Note:
10+
11+
- You are required to develop individual microservices within separate folders within this
12+
repository.
13+
- The teaching team should be given access to the repositories as we may require viewing the history
14+
of the repository in case of any disputes or disagreements.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Dependencies
2+
node_modules
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build outputs
8+
dist
9+
build
10+
*.tsbuildinfo
11+
12+
# Environment files
13+
.env
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
# IDE files
20+
.vscode
21+
.idea
22+
*.swp
23+
*.swo
24+
25+
# OS files
26+
.DS_Store
27+
Thumbs.db
28+
29+
# Git
30+
.git
31+
.gitignore
32+
33+
# Docker
34+
Dockerfile
35+
.dockerignore
36+
docker-compose*.yml
37+
38+
# Logs
39+
logs
40+
*.log
41+
42+
# Runtime data
43+
pids
44+
*.pid
45+
*.seed
46+
*.pid.lock
47+
48+
# Coverage directory used by tools like istanbul
49+
coverage
50+
51+
# Dependency directories
52+
jspm_packages/
53+
54+
# Optional npm cache directory
55+
.npm
56+
57+
# Optional eslint cache
58+
.eslintcache

collaboration-service/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dockerfile for backend services (user-service, question-service, matching-service, collaboration-service)
2+
FROM node:20-alpine
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json (if available)
8+
COPY package*.json ./
9+
10+
# Install dependencies
11+
RUN npm install
12+
13+
# Copy source code
14+
COPY . .
15+
16+
# Expose the port (will be overridden by docker-compose for each service)
17+
EXPOSE 8082
18+
19+
# Start the application
20+
CMD ["npm", "run", "dev"]

collaboration-service/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# User Service Guide

collaboration-service/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "collaboration-service",
3+
"version": "0.0.1",
4+
"description": "",
5+
"main": "index.js",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "node ./src/index.js",
9+
"lint": "cd .. && npm run lint:service collaboration-service --ext .ts",
10+
"lint:fix": "cd .. && npm run lint:service collaboration-service --ext .ts --fix",
11+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
12+
"test": "echo \"Error: no test specified\" && exit 1"
13+
},
14+
"keywords": [],
15+
"author": "",
16+
"license": "ISC",
17+
"dependencies": {
18+
"express": "^5.1.0"
19+
},
20+
"devDependencies": {
21+
"@types/express": "^5.0.3",
22+
"@types/node": "^24.3.1"
23+
}
24+
}

0 commit comments

Comments
 (0)