Merge pull request #645 from AmruthPillai/feat/add-docs-workspace

Add docs powered by Docusaurus v2
This commit is contained in:
Amruth Pillai 2022-03-11 20:03:29 +01:00 committed by GitHub
commit 32f78e85f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 6423 additions and 258 deletions

View File

@ -1,11 +1,18 @@
# Build Artifacts
dist
.next
# Schema
schema/dist
# Server
server/dist
# Client
client/.next
client/public/__ENV.js
# IDEs
.vscode
# Project Metadata
LICENSE
README.md
CHANGELOG.md
@ -18,4 +25,8 @@ Dockerfile
docker-compose.yml
# Android App
/app
/app
# Docs
docs/build
docs/.docusaurus

View File

@ -7,7 +7,7 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/amruthpillai/reactive-resume?style=flat-square)](https://hub.docker.com/r/amruthpillai/reactive-resume)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FAmruthPillai%2FReactive-Resume.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FAmruthPillai%2FReactive-Resume?ref=badge_shield)
## [Go to App](https://rxresu.me/)
## [Go to App](https://rxresu.me) | [Docs](https://docs.rxresu.me)
Reactive Resume is a free and open source resume builder thats built to make the mundane tasks of creating, updating and sharing your resume as easy as 1, 2, 3. With this app, you can create multiple resumes, share them with recruiters through a unique link and print as PDF, all for free, no advertisements, without losing the integrity and privacy of your data.
@ -42,64 +42,17 @@ You have complete control over what goes into your resume, how it looks, what co
Help by [translating Reactive Resume](https://translate.rxresu.me) to your language!
## Docker Setup
## Tutorial
You can pull the prebuilt docker images right off the shelf from either [Docker Hub](https://hub.docker.com/repository/docker/amruthpillai/reactive-resume) or [GitHub Container Registry](https://ghcr.io/amruthpillai/reactive-resume). Keep in mind, you would also need a database for this to work as intended.
```sh
# Server
docker run -p 3100:3100 --env-file .env amruthpillai/reactive-resume:server-latest
# Client
docker run -p 3000:3000 --env-file .env amruthpillai/reactive-resume:client-latest
```
Or, to make your life easier there's a simple `docker-compose.yml` included to help you get set up for success.
```sh
docker compose up
```
The docs include an extensive [Tutorial](https://docs.rxresu.me/tutorial) section which outline the features of Reactive Resume and help you through building your first resume on the app.
## Build from Source
If you don't want to use Docker, I understand. There's an old-school way to build the app too. This project, and these instructions rely heavily on [pnpm](https://pnpm.io/) so you might want to have that installed on your system before you continue.
1. Clone the repository locally, or use GitHub Codespaces or CodeSandbox
```
git clone https://github.com/AmruthPillai/Reactive-Resume.git
cd Reactive-Resume
```
2. Install dependencies using `pnpm`, but feel free to use any other package manager that supports npm workspaces.
```
pnpm install
```
3. Copy the `.env.example` file to `.env` in the project root and fill it with values according to your setup. You can skip the SendGrid variables if you don't want to set up mail right away.
```
cp .env.example .env
```
1. Use Docker Compose to create a PostgreSQL instance and a `reactive_resume` database, or feel free to use your own and modify the variables used in `.env`
```
docker-compose up -d postgres
```
5. Run the project and start building!
```
pnpm dev
```
For extensive information on how to build the app on your local machine, head over to the docs's [Source Code](https://docs.rxresu.me/source-code) section.
## Contributing
Please refer to the project's style and contribution guidelines for submitting pull requests.
In general, this project follows the "fork-and-pull" Git workflow.
This project makes use of [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) style and workflow for commit messages to ensure that the CHANGELOG is auto-generated. In general, this project follows the "fork-and-pull" Git workflow.
1. **Fork** the repo on GitHub
2. **Clone** the project to your own machine
@ -117,15 +70,17 @@ Use the [GitHub Issues](https://github.com/AmruthPillai/Reactive-Resume/issues/n
Reactive Resume would be nothing without the folks who supported me and kept the project alive in the beginning, and your cotinued support is what keeps me going. If you found Reactive Resume to be useful, helpful or just insightful and appreciate the effort I took to make the project, please consider donating as little or as much as your can.
[☕️ Buy me a coffee](https://www.buymeacoffee.com/AmruthPillai)
### [☕️ Buy me a coffee](https://www.buymeacoffee.com/AmruthPillai) | [💸 PayPal](https://paypal.me/RajaRajanA)
## Infrastructure
- Next.js, frontend
- NestJS, backend
- PostgreSQL, database
- DigitalOcean, infrastructure provider
- Crowdin, translation management platform
- [Next.js](https://nextjs.org/), frontend
- [NestJS](https://nestjs.com/), backend
- [PostgreSQL](https://www.postgresql.org/), database
- [DigitalOcean](https://www.digitalocean.com/), infrastructure provider
- [Crowdin](https://translate.rxresu.me/), translation management platform
 
<a href="https://pillai.xyz/digitalocean">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg" width="200px" />

4
docs/.eslintrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"extends": "../.eslintrc.json",
"ignorePatterns": ["build", ".docusaurus"]
}

20
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

3
docs/babel.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

67
docs/docs/index.mdx Normal file
View File

@ -0,0 +1,67 @@
---
sidebar_position: 1
sidebar_label: Introduction
---
import TOCInline from '@theme/TOCInline';
# Reactive Resume
![Project Version](https://img.shields.io/github/package-json/v/AmruthPillai/Reactive-Resume?style=flat-square)
![Project License](https://img.shields.io/github/license/AmruthPillai/Reactive-Resume?style=flat-square)
[![Docker Pulls](https://img.shields.io/docker/pulls/amruthpillai/reactive-resume?style=flat-square)](https://hub.docker.com/r/amruthpillai/reactive-resume)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FAmruthPillai%2FReactive-Resume.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FAmruthPillai%2FReactive-Resume?ref=badge_shield)
## [Go to App](https://rxresu.me) | [Docs](https://docs.rxresu.me)
## Summary
Reactive Resume is a free and open source resume builder that's built to make the mundane tasks of creating, updating and sharing your resume as easy as 1, 2, 3. With this app, you can create multiple resumes, share them with recruiters through a unique link and print as PDF, all for free, no advertisements, without losing the integrity and privacy of your data.
You have complete control over what goes into your resume, how it looks, what colors, what templates, even the layout in which sections placed. Want a dark mode resume? It's as easy as editing 3 values and you're done. You don't need to wait to see your changes either. Everything you type, everything you change, appears immediately on your resume and gets updated in real time.
## Features
- Free, forever
- No Advertising
- No User Tracking
- Sync your data across devices
- Import data from [LinkedIn](https://www.linkedin.com/), [JSON Resume](https://jsonresume.org/)
- Manage multiple resumes with one account
- Open Source (with large community support)
- Send your resume to others with a unique sharable link
- Accessible in multiple languages, [help translate here](https://translate.rxresu.me/)
- Pick any font from [Google Fonts](https://fonts.google.com/) to use on your resume
- Choose from 6 vibrant templates and more coming soon
- Export your resume to JSON or PDF format with just one click
- Create an account using your email, or just Sign in with Google
- Mix and match colors to any degree, even a dark mode resume?
- Add sections, add pages and change layouts the way you want to
- Tailor-made Backend and Database, isolated from Google, Amazon etc.
- **Oh, and did I mention that it's free?**
## Languages
- English
- German (Deutsch)
- Kannada (ಕನ್ನಡ) (@aksh1251)
- Tamil (தமிழ்)
Help by [translating Reactive Resume](https://translate.rxresu.me) to your language!
## Report Issues
Use the [GitHub Issues](https://github.com/AmruthPillai/Reactive-Resume/issues/new/choose) platform to notify me about bugs or new features that you would like to see in Reactive Resume. Please check before creating new issues as there might already be one.
## Donations
Reactive Resume would be nothing without the folks who supported me and kept the project alive in the beginning, and your cotinued support is what keeps me going. If you found Reactive Resume to be useful, helpful or just insightful and appreciate the effort I took to make the project, please consider donating as little or as much as your can.
#### [☕️ Buy me a coffee](https://www.buymeacoffee.com/AmruthPillai) | [💸 PayPal](https://paypal.me/RajaRajanA)
## License
Reactive Resume is packaged and distributed using the [MIT License](https://choosealicense.com/licenses/mit/) which allows for commercial use, distribution, modification and private use provided that all copies of the software contain the same license and copyright.
_By the community, for the community._
A passion project by [Amruth Pillai](https://amruthpillai.com/)

View File

@ -0,0 +1,2 @@
position: 3
label: Source Code

View File

@ -0,0 +1,38 @@
---
sidebar_position: 1
---
# Docker
This is probably the easiest method to build the source code on your machine if you already have Docker and Docker Compose installed. If you don't have Docker on your machine, I'll let you figure that out on your own.
1. Once you have Docker set up, you can pull the source code from GitHub and dive into the repository.
```bash
git clone git@github.com:AmruthPillai/Reactive-Resume.git
cd Reactive-Resume
```
2. Install dependencies using [pnpm](https://pnpm.io/), but feel free to use any other package manager that supports [npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces).
```bash
pnpm install
```
3. Copy the `.env.example` file to `.env` in the project root and fill it with values according to your setup. To know which environment variables are required, and about what they do, head over [this section](env-vars).
```bash
cp .env.example .env
```
4. Use Docker Compose to create a PostgreSQL instance and a `reactive_resume` database, or feel free to use your own and modify the variables used in `.env`
```bash
docker-compose up -d postgres
```
5. Run the project and start building!
```bash
pnpm dev
```

View File

@ -0,0 +1,163 @@
---
sidebar_position: 3
---
import TOCInline from '@theme/TOCInline';
# Environment Variables
The project source code requires certain envrionment variables to be pre-set in order to work as expected. You can get a copy of what the `.env` file should look like from the `.env.example` file in the root of the project's [source code](https://github.com/AmruthPillai/Reactive-Resume/blob/main/.env.example).
Here, I'll be explaining what each of the environment variables are for, and which ones are actually **required** and which ones aren't.
### Sections
<TOCInline toc={toc} minHeadingLevel="2" maxHeadingLevel="2" />
## App
### `TZ`
**Required**: `no`
**Default Value:** `UTC`
**Description:** Server Timezone
This field is just to indicate the timezone that the server should follow. This is just so that the date time information should be unified and all timestamps should follow the same suit.
### `SECRET_KEY`
**Required**: `yes`
**Description:** Secret Key for Client-Server Communication
The secret key can be a unique key, a randomly generated string that is used for client-server communication. You can use this [random.org](https://www.random.org/strings/?num=10&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=html&rnd=new) configuration to generate a long unique string.
## URLs
### `PUBLIC_URL`
**Required**: `yes`
**Description:** URL through which app is accessible
**Default Value:** `http://localhost:3000`
This URL would be used in features like link sharing functionality and authentication redirection. This points only to the client app, as the server would be running on `PORT 3100` always.
### `PUBLIC_SERVER_URL`
**Required**: `yes`
**Description:** URL through which server is accessible
**Default Value:** `http://localhost:3100`
This URL is used when export PDF functionality is used within the app and has to reach out to the server.
## Database
### `POSTGRES_HOST`
**Required**: `yes`
**Default Value:** `localhost`
**Description:** Hostname for the PostgreSQL Server
### `POSTGRES_PORT`
**Required**: `yes`
**Default Value:** `5432`
**Description:** Port of the PostgreSQL Server
### `POSTGRES_USERNAME`
**Required**: `yes`
**Default Value:** `postgres`
**Description:** Username of the PostgreSQL Server
### `POSTGRES_PASSWORD`
**Required**: `yes`
**Default Value:** `postgres`
**Description:** Password of the PostgreSQL Server
### `POSTGRES_DATABASE`
**Required**: `yes`
**Default Value:** `reactive_resume`
**Description:** Name of the Database in PostgreSQL Server
### `POSTGRES_SSL_CERT`
**Required**: `no`
**Description:** Base64 Encoded String of the SSL CA Certificate
Some production-grade managed databases require the need to pass a CA certificate along with the options. You can encode the contents of the `.crt` file sent to you by your cloud provider in _Base64_ and provide it as a environment variable.
## Authentication
### `JWT_SECRET`
**Required**: `yes`
**Description:** Secret to Sign and Extract JWT Payloads
Similar to the `SECRET_KEY`, this can also be a unique generated string. This is used for email/password authentication, to hash + salt passwords stored in the database so they are unreadable.
### `JWT_EXPIRY_TIME`
**Required**: `yes`
**Default Value:** `604800`
**Description:** How long should the JWT be valid for?
This value, in milliseconds, denotes the validity of the JWT token. A shorter value would make the user have to login more frequently.
## Google
As much as I'd like to keep Google out of the picture, they do provide a few services that are actually useful. Namely, Google OAuth (for Login with Google) and Google Fonts (to list all fonts and use them on a resume).
### `PUBLIC_GOOGLE_CLIENT_ID`
**Required**: `no`
**Description:** Google Client ID for Google Login
This field is only required if the Google Login functionality is important to you.
### `GOOGLE_CLIENT_SECRET`
**Required**: `no`
**Description:** Google Client Secret for Google Login
This field is only required if the Google Login functionality is important to you.
### `GOOGLE_API_KEY`
**Required**: `yes`
**Description:** Google API Key used for fetching Google Fonts
Within the resume builder, there's a section where you can pick any font from the Google Fonts Library. To fetch the names and IDs of these fonts, we depend on the Google Fonts API. It does not cost any payment, or the need to enter credit card information to create or use this API.
You can get your own key here: https://developers.google.com/fonts/docs/developer_api
## SendGrid
The server makes use of SendGrid to send the password reset email to those who have forgotten their password. **This section is completely optional for those who do not require this functionality.**
### `SENDGRID_API_KEY`
**Required**: `no`
**Description:** SendGrid API Key
Does not require any payment or credit card information to obtain an API key.
You can get your own key here: https://docs.sendgrid.com/ui/account-and-settings/api-keys
### `SENDGRID_FORGOT_PASSWORD_TEMPLATE_ID`
**Required**: `no`
**Description:** Dynamic Template ID for Forgot Password
### `SENDGRID_FROM_NAME`
**Required**: `no`
**Description:** Sender's Name
### `SENDGRID_FROM_EMAIL`
**Required**: `no`
**Description:** Sender's Email Address

View File

@ -0,0 +1,14 @@
---
sidebar_position: 3
---
# Source Code
No, I'm not going to be talking about [the 2011 movie](https://www.imdb.com/title/tt0945513/) here.
The source code to Reactive Resume is available on [GitHub](https://github.com/AmruthPillai) for you to poke, prod, pull and publish. It is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) which allows you to do **anything you want** with it, including commercial use.
In this section, I'll be going through the steps on how you can build the project on your local machine (or the cloud). You can choose one of two paths from here:
- [Docker](docker)
- [Local Build](local-build)

View File

@ -0,0 +1,48 @@
---
sidebar_position: 2
---
# Local Build
This might not be the most versatile, but it's quite easy and my recommended way of getting the project set up. This project is heavily dependent on [pnpm](https://pnpm.io) and it's monorepo workspaces feature, so I'd pick that up if I were you.
1. Once you have `pnpm` set up, you can pull the source code from GitHub and dive into the repository.
```bash
git clone git@github.com:AmruthPillai/Reactive-Resume.git
cd Reactive-Resume
```
2. Install dependencies using [pnpm](https://pnpm.io/), and it should take just a few minutes.
```bash
pnpm install
```
3. Copy the `.env.example` file to `.env` in the project root and fill it with values according to your setup. To know which environment variables are required, and about what they do, head over [this section](env-vars).
```bash
cp .env.example .env
```
4. Run the app locally by using the command:
```bash
pnpm dev
```
Now, your **frontend** client should be running on [`http://localhost:3000`](http://localhost:3000), your **backend** server on [`http://localhost:3100`](http://localhost:3100) and this **documentation** on [`http://localhost:3200`](http://localhost:3200).
5. Build the project before deploying by running the command:
```bash
pnpm build
```
6. Finally, start the production servers for all three workspaces by running:
```bash
pnpm start
```
Additionally, you can check the `package.json` for some additional scripts on how to run commands for a specific workspace. For more information on pnpm workspaces, head over to [their documentation](https://pnpm.io/workspaces).

View File

@ -0,0 +1,2 @@
position: 2
label: Tutorial

View File

@ -0,0 +1,5 @@
---
sidebar_position: 4
---
# Playing with the artboard

View File

@ -0,0 +1,5 @@
---
sidebar_position: 1
---
# Creating an account

View File

@ -0,0 +1,5 @@
---
sidebar_position: 2
---
# Create a new resume

View File

@ -0,0 +1,5 @@
---
sidebar_position: 6
---
# Create a custom section

View File

@ -0,0 +1,5 @@
---
sidebar_position: 7
---
# Exporting the resume

View File

@ -0,0 +1,5 @@
---
sidebar_position: 3
---
# Import from external sources

View File

@ -0,0 +1,8 @@
---
sidebar_position: 2
sidebar_label: Tutorial
---
# Tutorial
In this section, we go through the features of Reactive Resume and figure out how to navigate through the user interface.

View File

@ -0,0 +1,5 @@
---
sidebar_position: 5
---
# Filling resume data

124
docs/docusaurus.config.js Normal file
View File

@ -0,0 +1,124 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Reactive Resume',
tagline: 'A free and open source resume builder.',
url: 'https://docs.rxresu.me',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'AmruthPillai',
projectName: 'Reactive-Resume',
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
blog: false,
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/AmruthPillai/Reactive-Resume/tree/main/docs',
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
},
theme: {
customCss: require.resolve('./styles/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Reactive Resume',
logo: {
alt: 'Reactive Resume',
src: 'img/logo.svg',
},
items: [
{
href: 'https://github.com/AmruthPillai/Reactive-Resume',
position: 'right',
label: 'GitHub',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Sections',
items: [
{
label: 'Tutorial',
to: '/tutorial',
},
{
label: 'Source Code',
to: '/source-code',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/AmruthPillai/Reactive-Resume',
},
{
label: 'Twitter',
href: 'https://twitter.com/AmruthPillai',
},
],
},
{
title: 'Support',
items: [
{
label: 'Donate',
href: 'https://buymeacoffee.com/AmruthPillai',
},
{
label: 'Translate',
href: 'https://translate.rxresu.me',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Amruth Pillai. Licensed under MIT. Built with Docusaurus.`,
},
metadata: [
{
name: 'keywords',
content: [
'reactive resume',
'resume builder',
'free resumes',
'resume templates',
'free resume templates',
'open source resume builder',
'resume builder source code',
].join(', '),
},
],
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;

45
docs/package.json Normal file
View File

@ -0,0 +1,45 @@
{
"name": "@reactive-resume/docs",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start --port 3200",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve --host 0.0.0.0 --port 3200",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@algolia/client-search": "^4.9.1",
"@docusaurus/core": "2.0.0-beta.17",
"@docusaurus/preset-classic": "2.0.0-beta.17",
"@docusaurus/theme-classic": "^2.0.0-beta.17",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.17",
"@docusaurus/types": "^2.0.0-beta.17",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": ">=16.8.0 <18.0.0",
"typescript": "^4.6.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

31
docs/sidebars.js Normal file
View File

@ -0,0 +1,31 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
};
module.exports = sidebars;

0
docs/static/.nojekyll vendored Normal file
View File

BIN
docs/static/img/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

17
docs/static/img/logo.svg vendored Normal file
View File

@ -0,0 +1,17 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M0 10C0 4.47715 4.47715 0 10 0H502C507.523 0 512 4.47715 512 10V502C512 507.523 507.523 512 502 512H10C4.47715 512 0 507.523 0 502V10Z"
fill="white" />
<path
d="M209.701 220L197.079 201.522L183.546 220H156.74L183.546 184.736L157.521 149.472H185.367L197.859 167.299L210.872 149.472H237.027L211.002 183.825L237.938 220H209.701Z"
fill="#444444" />
<path
d="M108.927 165.797H94.8735V190H69.1088V98.9125H110.749C118.99 98.9125 126.147 100.3 132.219 103.076C138.292 105.766 142.976 109.669 146.273 114.788C149.569 119.819 151.218 125.762 151.218 132.615C151.218 139.208 149.656 144.977 146.533 149.921C143.497 154.779 139.116 158.596 133.391 161.372L153.039 190H125.453L108.927 165.797ZM125.193 132.615C125.193 128.364 123.848 125.068 121.159 122.725C118.47 120.383 114.479 119.212 109.187 119.212H94.8735V145.888H109.187C114.479 145.888 118.47 144.76 121.159 142.504C123.848 140.162 125.193 136.866 125.193 132.615Z"
fill="#444444" />
<path
d="M94.08 273.12H85.44V288H69.6V232H95.2C100.267 232 104.667 232.853 108.4 234.56C112.133 236.213 115.013 238.613 117.04 241.76C119.067 244.853 120.08 248.507 120.08 252.72C120.08 256.773 119.12 260.32 117.2 263.36C115.333 266.347 112.64 268.693 109.12 270.4L121.2 288H104.24L94.08 273.12ZM104.08 252.72C104.08 250.107 103.253 248.08 101.6 246.64C99.9467 245.2 97.4933 244.48 94.24 244.48H85.44V260.88H94.24C97.4933 260.88 99.9467 260.187 101.6 258.8C103.253 257.36 104.08 255.333 104.08 252.72ZM172.419 266.4C172.419 266.507 172.339 267.76 172.179 270.16H140.659C141.299 272.4 142.525 274.133 144.339 275.36C146.205 276.533 148.525 277.12 151.299 277.12C153.379 277.12 155.165 276.827 156.659 276.24C158.205 275.653 159.752 274.693 161.299 273.36L169.299 281.68C165.085 286.373 158.925 288.72 150.819 288.72C145.752 288.72 141.299 287.76 137.459 285.84C133.619 283.92 130.632 281.253 128.499 277.84C126.419 274.427 125.379 270.56 125.379 266.24C125.379 261.973 126.392 258.16 128.419 254.8C130.499 251.387 133.352 248.72 136.979 246.8C140.605 244.88 144.685 243.92 149.219 243.92C153.539 243.92 157.459 244.827 160.979 246.64C164.499 248.4 167.272 250.987 169.299 254.4C171.379 257.76 172.419 261.76 172.419 266.4ZM149.299 254.72C146.952 254.72 144.979 255.387 143.379 256.72C141.832 258.053 140.845 259.867 140.419 262.16H158.179C157.752 259.867 156.739 258.053 155.139 256.72C153.592 255.387 151.645 254.72 149.299 254.72ZM195.187 288.72C191.56 288.72 187.987 288.32 184.467 287.52C180.947 286.667 178.12 285.573 175.987 284.24L180.547 273.84C182.52 275.067 184.867 276.053 187.587 276.8C190.307 277.493 193 277.84 195.667 277.84C198.12 277.84 199.854 277.6 200.867 277.12C201.934 276.587 202.467 275.84 202.467 274.88C202.467 273.92 201.827 273.253 200.547 272.88C199.32 272.453 197.347 272.053 194.627 271.68C191.16 271.253 188.2 270.693 185.747 270C183.347 269.307 181.267 268.027 179.507 266.16C177.747 264.293 176.867 261.68 176.867 258.32C176.867 255.547 177.694 253.093 179.347 250.96C181 248.773 183.4 247.067 186.547 245.84C189.747 244.56 193.56 243.92 197.987 243.92C201.134 243.92 204.254 244.24 207.347 244.88C210.44 245.52 213.027 246.427 215.107 247.6L210.547 257.92C206.707 255.787 202.547 254.72 198.067 254.72C195.667 254.72 193.907 255.013 192.787 255.6C191.667 256.133 191.107 256.853 191.107 257.76C191.107 258.773 191.72 259.493 192.947 259.92C194.174 260.293 196.2 260.693 199.027 261.12C202.6 261.653 205.56 262.267 207.907 262.96C210.254 263.653 212.28 264.933 213.987 266.8C215.747 268.613 216.627 271.173 216.627 274.48C216.627 277.2 215.8 279.653 214.147 281.84C212.494 283.973 210.04 285.653 206.787 286.88C203.587 288.107 199.72 288.72 195.187 288.72ZM268.777 244.64V288H254.297V283.36C252.697 285.12 250.777 286.453 248.537 287.36C246.297 288.267 243.924 288.72 241.417 288.72C235.817 288.72 231.337 287.067 227.977 283.76C224.67 280.453 223.017 275.493 223.017 268.88V244.64H238.217V266.4C238.217 269.653 238.83 272.027 240.057 273.52C241.284 275.013 243.07 275.76 245.417 275.76C247.817 275.76 249.764 274.933 251.257 273.28C252.804 271.573 253.577 268.987 253.577 265.52V244.64H268.777ZM335.048 243.92C340.381 243.92 344.621 245.52 347.768 248.72C350.968 251.92 352.568 256.747 352.568 263.2V288H337.368V265.68C337.368 262.64 336.781 260.4 335.608 258.96C334.488 257.52 332.888 256.8 330.808 256.8C328.514 256.8 326.674 257.6 325.288 259.2C323.901 260.8 323.208 263.227 323.208 266.48V288H308.008V265.68C308.008 259.76 305.821 256.8 301.448 256.8C299.101 256.8 297.234 257.6 295.848 259.2C294.461 260.8 293.768 263.227 293.768 266.48V288H278.568V244.64H293.048V249.2C294.648 247.44 296.541 246.133 298.728 245.28C300.968 244.373 303.394 243.92 306.008 243.92C309.048 243.92 311.768 244.48 314.168 245.6C316.568 246.72 318.514 248.427 320.008 250.72C321.714 248.533 323.874 246.853 326.488 245.68C329.101 244.507 331.954 243.92 335.048 243.92ZM407.106 266.4C407.106 266.507 407.026 267.76 406.866 270.16H375.346C375.986 272.4 377.213 274.133 379.026 275.36C380.893 276.533 383.213 277.12 385.986 277.12C388.066 277.12 389.853 276.827 391.346 276.24C392.893 275.653 394.44 274.693 395.986 273.36L403.986 281.68C399.773 286.373 393.613 288.72 385.506 288.72C380.44 288.72 375.986 287.76 372.146 285.84C368.306 283.92 365.32 281.253 363.186 277.84C361.106 274.427 360.066 270.56 360.066 266.24C360.066 261.973 361.08 258.16 363.106 254.8C365.186 251.387 368.04 248.72 371.666 246.8C375.293 244.88 379.373 243.92 383.906 243.92C388.226 243.92 392.146 244.827 395.666 246.64C399.186 248.4 401.96 250.987 403.986 254.4C406.066 257.76 407.106 261.76 407.106 266.4ZM383.986 254.72C381.64 254.72 379.666 255.387 378.066 256.72C376.52 258.053 375.533 259.867 375.106 262.16H392.866C392.44 259.867 391.426 258.053 389.826 256.72C388.28 255.387 386.333 254.72 383.986 254.72Z"
fill="#444444" />
<line x1="60" y1="358" x2="360" y2="358" stroke="#DDDDDD" stroke-width="20" stroke-miterlimit="16" />
<line x1="60" y1="398" x2="300" y2="398" stroke="#BBBBBB" stroke-width="20" stroke-miterlimit="16" />
<line x1="60" y1="438" x2="240" y2="438" stroke="#DDDDDD" stroke-width="20" stroke-miterlimit="16" />
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

39
docs/styles/custom.css Normal file
View File

@ -0,0 +1,39 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
}
.docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.1);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
}

6
docs/tsconfig.json Normal file
View File

@ -0,0 +1,6 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}

View File

@ -5,7 +5,8 @@
"workspaces": [
"schema",
"client",
"server"
"server",
"docs"
],
"config": {
"commitizen": {
@ -20,13 +21,16 @@
"dev:schema": "pnpm -F schema dev",
"dev:server": "pnpm -F server start:debug",
"dev:client": "pnpm -F client dev",
"dev:docs": "pnpm -F docs start",
"dev": "env-cmd --silent concurrently --kill-others \"pnpm run dev:*\"",
"build:schema": "pnpm -F schema build",
"build:server": "pnpm -F server build",
"build:client": "pnpm -F client build",
"build:docs": "pnpm -F docs build",
"build": "env-cmd --silent concurrently \"pnpm run build:*\"",
"start:server": "pnpm -F server start:prod",
"start:client": "pnpm -F client start",
"start:docs": "pnpm -F docs serve",
"start": "env-cmd --silent concurrently --kill-others \"pnpm run start:*\""
},
"dependencies": {

File diff suppressed because it is too large Load Diff

View File

@ -2,3 +2,4 @@ packages:
- 'schema'
- 'server'
- 'client'
- 'docs'

View File

@ -38,10 +38,7 @@ export class AuthService {
throw new HttpException('A user with that username and/or email already exists.', HttpStatus.UNAUTHORIZED);
}
throw new HttpException(
'Something went wrong. Please try again later, or raise an issue on GitHub if the problem persists.',
HttpStatus.INTERNAL_SERVER_ERROR
);
throw new HttpException(error, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@ -124,7 +121,7 @@ export class AuthService {
return user;
} catch (error: any) {
if (error.status !== HttpStatus.NOT_FOUND) {
throw new Error('Something went wrong, please try again later.');
throw new HttpException(error, HttpStatus.BAD_GATEWAY);
}
const UserInfoClient = google.oauth2('v2').userinfo;