Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

147 changes: 135 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</pre>
</div>
<p align="center">
<img src="https://img.shields.io/github/actions/workflow/status/the-berufegoru/work-whiz/ci.yml?branch=main&label=CI&logo=githubactions&logoColor=white&color=0080ff" alt="CI Status">
<img src="https://img.shields.io/github/actions/workflow/status/the-berufegoru/work-whiz/codeql.yml?branch=main&label=CodeQL&logo=github&logoColor=white&color=yellow"**** alt="CodeQL Status">
<img src="https://img.shields.io/github/license/the-berufegoru/work-whiz?style=default&logo=opensourceinitiative&logoColor=white&color=0080ff" alt="license">
<img src="https://img.shields.io/github/last-commit/the-berufegoru/work-whiz?style=default&logo=git&logoColor=white&color=0080ff" alt="last-commit">
<img src="https://img.shields.io/github/actions/workflow/status/iamkabelomoobi/work-whiz/ci.yml?branch=main&label=CI&logo=githubactions&logoColor=white&color=0080ff" alt="CI Status">
<img src="https://img.shields.io/github/actions/workflow/status/iamkabelomoobi/work-whiz/codeql.yml?branch=main&label=CodeQL&logo=github&logoColor=white&color=yellow"**** alt="CodeQL Status">
<img src="https://img.shields.io/github/license/iamkabelomoobi/work-whiz?style=default&logo=opensourceinitiative&logoColor=white&color=0080ff" alt="license">
<img src="https://img.shields.io/github/last-commit/iamkabelomoobi/work-whiz?style=default&logo=git&logoColor=white&color=0080ff" alt="last-commit">

</p>
<p align="center"><!-- default option, no dependency badges. -->
Expand All @@ -34,6 +34,7 @@
- [☑️ Prerequisites](#️-prerequisites)
- [⚙️ Installation](#️-installation)
- [🤖 Usage](#-usage)
- [🔐 Auth API](#-auth-api)
- [📌 Project Roadmap](#-project-roadmap)
- [🔰 Contributing](#-contributing)
- [🎗 License](#-license)
Expand Down Expand Up @@ -65,7 +66,7 @@ Install work-whiz using one of the following methods:
1. Clone the work-whiz repository:

```sh
❯ git clone https://github.com/the-berufegoru/work-whiz
❯ git clone https://github.com/iamkabelomoobi/work-whiz
```

2. Navigate to the project directory:
Expand All @@ -85,7 +86,7 @@ Install work-whiz using one of the following methods:
**Using `docker`** &nbsp; [<img align="center" src="https://img.shields.io/badge/Docker-2CA5E0.svg?style={badge_style}&logo=docker&logoColor=white" />](https://www.docker.com/)

```sh
❯ docker build -t the-berufegoru/work-whiz .
❯ docker build -t iamkabelomoobi/work-whiz .
```

### 🤖 Usage
Expand Down Expand Up @@ -114,6 +115,128 @@ Run the test suite using the following command:
❯ npm run test
````

### 🔐 Auth API

Auth routes are handled by Better Auth and mounted under `/api/auth`.

#### Main endpoints

| Method | Endpoint |
| --- | --- |
| `POST` | `/api/auth/sign-up/email` |
| `POST` | `/api/auth/sign-in/email` |
| `POST` | `/api/auth/sign-out` |
| `GET`, `POST` | `/api/auth/get-session` |
| `GET` | `/api/auth/verify-email?token=...` |
| `POST` | `/api/auth/send-verification-email` |
| `POST` | `/api/auth/request-password-reset` |
| `POST` | `/api/auth/reset-password` |
| `GET` | `/api/auth/reset-password/:token` |
| `POST` | `/api/auth/change-password` |
| `POST` | `/api/auth/verify-password` |

#### Sign-up request bodies

Candidate:

```json
{
"name": "Candidate User",
"email": "candidate@example.com",
"password": "StrongPass123!",
"phone": "+270000000001",
"role": "candidate",
"title": "Mr"
}
```

Employer:

```json
{
"name": "Orbit Talent",
"email": "employer@example.com",
"password": "StrongPass123!",
"phone": "+270000000002",
"role": "employer",
"industry": "Technology",
"websiteUrl": "https://example.com",
"location": "Remote",
"description": "Hiring platform team",
"size": 25,
"foundedIn": 2020
}
```

Admin:

```json
{
"name": "Admin User",
"email": "admin@example.com",
"password": "StrongPass123!",
"phone": "+270000000003",
"role": "admin"
}
```

#### Common request bodies

Sign in:

```json
{
"email": "candidate@example.com",
"password": "StrongPass123!"
}
```

Request password reset:

```json
{
"email": "candidate@example.com",
"redirectTo": "http://localhost:4200/reset-password"
}
```

Reset password:

```json
{
"token": "reset-token-from-email",
"newPassword": "NewStrongPass123!"
}
```

#### Session and account endpoints

| Method | Endpoint |
| --- | --- |
| `GET` | `/api/auth/list-sessions` |
| `POST` | `/api/auth/revoke-session` |
| `POST` | `/api/auth/revoke-sessions` |
| `POST` | `/api/auth/revoke-other-sessions` |
| `POST` | `/api/auth/update-session` |
| `POST` | `/api/auth/update-user` |
| `POST` | `/api/auth/delete-user` |
| `GET` | `/api/auth/delete-user/callback` |
| `GET` | `/api/auth/list-accounts` |
| `POST` | `/api/auth/unlink-account` |
| `GET` | `/api/auth/account-info` |

#### OAuth and social endpoints

| Method | Endpoint |
| --- | --- |
| `POST` | `/api/auth/sign-in/social` |
| `GET`, `POST` | `/api/auth/callback/:id` |
| `POST` | `/api/auth/link-social` |
| `POST` | `/api/auth/refresh-token` |
| `POST` | `/api/auth/get-access-token` |

The current app configuration enables email/password auth and email verification. Social provider endpoints are exposed by Better Auth, but no social providers are configured yet.

---

## 📌 Project Roadmap
Expand All @@ -128,9 +251,9 @@ Run the test suite using the following command:

## 🔰 Contributing

- **💬 [Join the Discussions](https://github.com/the-berufegoru/work-whiz/discussions)**: Share your insights, provide feedback, or ask questions.
- **🐛 [Report Issues](https://github.com/the-berufegoru/work-whiz/issues)**: Submit bugs found or log feature requests for the `work-whiz` project.
- **💡 [Submit Pull Requests](https://github.com/the-berufegoru/work-whiz/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.
- **💬 [Join the Discussions](https://github.com/iamkabelomoobi/work-whiz/discussions)**: Share your insights, provide feedback, or ask questions.
- **🐛 [Report Issues](https://github.com/iamkabelomoobi/work-whiz/issues)**: Submit bugs found or log feature requests for the `work-whiz` project.
- **💡 [Submit Pull Requests](https://github.com/iamkabelomoobi/work-whiz/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.

<details closed>
<summary>Contributing Guidelines</summary>
Expand All @@ -139,7 +262,7 @@ Run the test suite using the following command:
2. **Clone Locally**: Clone the forked repository to your local machine using a git client.

```sh
git clone https://github.com/the-berufegoru/work-whiz
git clone https://github.com/iamkabelomoobi/work-whiz
```

3. **Create a New Branch**: Always work on a new branch, giving it a descriptive name.
Expand Down Expand Up @@ -170,8 +293,8 @@ Run the test suite using the following command:
<summary>Contributor Graph</summary>
<br>
<p align="left">
<a href="https://github.com{/the-berufegoru/work-whiz/}graphs/contributors">
<img src="https://contrib.rocks/image?repo=the-berufegoru/work-whiz">
<a href="https://github.com{/iamkabelomoobi/work-whiz/}graphs/contributors">
<img src="https://contrib.rocks/image?repo=iamkabelomoobi/work-whiz">
</a>
</p>
</details>
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:

elasticsearch:
image: ${ELASTICSEARCH_IMAGE:-docker.elastic.co/elasticsearch/elasticsearch:8.15.3}
container_name: ${ELASTICSEARCH_CONTAINER_DEV:-estate-grid-elasticsearch-dev}
container_name: ${ELASTICSEARCH_CONTAINER_DEV:-work-whiz-elasticsearch-dev}
restart: unless-stopped
ports:
- "${ELASTICSEARCH_PORT:-9200}:9200"
Expand All @@ -65,7 +65,7 @@ services:

kibana:
image: ${KIBANA_IMAGE:-docker.elastic.co/kibana/kibana:8.15.3}
container_name: ${KIBANA_CONTAINER_DEV:-estate-grid-kibana-dev}
container_name: ${KIBANA_CONTAINER_DEV:-work-whiz-kibana-dev}
restart: unless-stopped
ports:
- "${KIBANA_PORT:-5601}:5601"
Expand Down
1 change: 1 addition & 0 deletions e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
},
],
},
Expand Down
Loading
Loading