Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0ffa086
feat: add server seed data
hackim18 Mar 12, 2024
fe24b80
feat: add bcrypt on the server
hackim18 Mar 12, 2024
e31b7ba
feat: add jsonwebtoken on the server
hackim18 Mar 12, 2024
978c8b5
feat: add error handling
hackim18 Mar 12, 2024
d991dba
feat: add server login
hackim18 Mar 13, 2024
3b19649
feat: add registers on the server
hackim18 Mar 13, 2024
7575a20
feat: add middlewares authentication
hackim18 Mar 13, 2024
b08c5d4
feat: add role on users
hackim18 Mar 13, 2024
7b89eb9
feat: add deleteAccount & addAccount
hackim18 Mar 14, 2024
095f7bf
feat: add upload multiple images
hackim18 Mar 14, 2024
6395a9a
feat: add delete image
hackim18 Mar 14, 2024
4969a5a
feat: add read findPlayer, findClan, playerRankings, and verifyToken
hackim18 Mar 14, 2024
a1ec49b
feat: add views player detail and player rankings
hackim18 Mar 15, 2024
4d8d859
feat: add views clan detail
hackim18 Mar 15, 2024
74378f1
feat: add client player verification
hackim18 Mar 15, 2024
34db0e3
feat: add client get all accounts
hackim18 Mar 15, 2024
137f19b
feat: add client register
hackim18 Mar 16, 2024
20a1692
feat: add client change password
hackim18 Mar 16, 2024
d84118b
feat: add client image gallery
hackim18 Mar 16, 2024
cd5ea6a
feat: add client delete account
hackim18 Mar 16, 2024
ac591ac
feat: add client login by google
hackim18 Mar 16, 2024
d00dcbd
feat: add client clan & player rankings
hackim18 Mar 16, 2024
447755c
new commit
hackim18 Mar 17, 2024
683dd32
Deploy
hackim18 Mar 17, 2024
aac91d5
feat: add test, styling, midtrans, unlock vip
hackim18 Mar 21, 2024
6b50fa9
feat: add test, styling, midtrans, unlock vip
hackim18 Mar 21, 2024
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
124 changes: 123 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,123 @@
# IP-RMT46
# IP-RMT46

# ClashInsight Documentation

## 1. Player Verification

Endpoint: /players/:playerTag/verifytoken

Method: POST

Request Body:

```json
{
"token": "player_token"
}
```

Response:

Status 200 OK: If the token is successfully verified.

```json
{
"status": "valid"
}
```

Status 400 Bad Request: If the token is invalid.

```json
{
"status": "invalid"
}
```

## 2. Image Gallery

Endpoint: /get-image

Method: GET

Response:

Status 200 OK: List of images successfully received.

```json
[
{
"id": "image_id",
"imgUrl": "image_url"
},
...
]
```

Endpoint: /add-images

Method: PATCH

Response:

Status 200 OK: Images successfully added.

```json
[
{
"id": "image_id",
"imgUrl": "image_url"
},
...
]
```

## 3. Login

Endpoint: /login

Method: POST

Request Body:

```json
{
"email": "user_email",
"password": "user_password"
}
```

Response:

Status 200 OK: Authentication successful

```json
{
"access_token": "access_token"
}
```

## 4. User Registration

Endpoint: /register

Method: POST

Request Body:

```json
{
"email": "user_email",
"password": "user_password"
}
```

Response:

Status 200 OK: Registration successful

```json
{
"access_token": "user_access_token"
}
```
1 change: 1 addition & 0 deletions client/individual-project/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GOOGLE_CLIENT_ID=
21 changes: 21 additions & 0 deletions client/individual-project/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
3 changes: 3 additions & 0 deletions client/individual-project/.firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vite.svg,1710210818009,699a02e0e68a579f687d364bbbe7633161244f35af068220aee37b1b33dfb3c7
index.html,1710690462120,19dc553850f7f190de712ded0a9176e839b718f5284246c785a9409b80c2cc00
assets/index-Drcvaqht.js,1710690462120,7c1fbebb393482fe3ec9dd546c14053970413d6f2fefc35a2b420ba1c6cac3ac
5 changes: 5 additions & 0 deletions client/individual-project/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "clash-insight"
}
}
26 changes: 26 additions & 0 deletions client/individual-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env
8 changes: 8 additions & 0 deletions client/individual-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
16 changes: 16 additions & 0 deletions client/individual-project/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
27 changes: 27 additions & 0 deletions client/individual-project/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>

<script src="https://accounts.google.com/gsi/client" async></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>

<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
></script>
</body>
</html>
Loading