Skip to content
Open
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
12 changes: 6 additions & 6 deletions docs/backend-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 4

# Backend Setup

To setup the Cv Keep API you will need MongoDB running on your machine, then create a new database and get its Mongo URI, you gonna need it. With MongoDB configured and the database URI available, follow the next steps. If you didnt cloned the **Cv Keep Backend** project, please, read the section [Requirements](/requirements) of this documentation.
To setup the Cv Keep API you will need MongoDB running on your machine, then create a new database and get its Mongo URI, you gonna need it. With MongoDB configured and the database URI available, follow the next steps. If you didn't cloned the **Cv Keep Backend** project, please, read the section [Requirements](/requirements) of this documentation.

### The .Env Files

Expand All @@ -24,14 +24,14 @@ The **cvkeep-backend** environment variables are:
|Name|Description|Default|Required|
|---|---|---|---|
|BASE|The API base route to deliver the API. The default the application root, if you defined `/fizz` for example, the entire API you respond after /fizz/* |/|true|
|PORT|The API port to deliver the application. You can ommit this information on your env in some hosts that sets ports automatically, like heroku for example. That doesnt mean you dont need a PORT env, only that was automatically setted|5000|true|
|PORT|The API port to deliver the application. You can omit this information on your env in some hosts that sets ports automatically, like heroku for example. That doesn't mean you don't need a PORT env, only that was automatically setted|5000|true|
|DEFAULT_LANG|The default language that the API must use for human readable messages. By default, "pt-br" and "en" are available|en|true|
|BRAND_NAME|The brand name to use when refering to your application in messages and emails, for example|Cv Keep|true|
|EXTRA_ALLOWED_ORIGINS|The cvkeep api uses strict CORS to validate requests. Here you can allow other Origins to connect to your API. You must set the origins separeted by spaces and consider complete URLs and its possible versions, for example: "https://www.otherorigin.com https://otherorigin.com"|""|false|
|BRAND_NAME|The brand name to use when referring to your application in messages and emails, for example|Cv Keep|true|
|EXTRA_ALLOWED_ORIGINS|The cvkeep api uses strict CORS to validate requests. Here you can allow other Origins to connect to your API. You must set the origins separated by spaces and consider complete URLs and its possible versions, for example: "https://www.otherorigin.com https://otherorigin.com"|""|false|
|CLIENT_URL|The Cv Keep frontend URL of the current environment|https://localhost:8080|true|
|SERVER_URL|The Cv Keep backend URL of the current environment|http://localhost:5000|true|
|UPLOAD_MAX_FILE_SIZE_MB|How big an image can be when being uploaded|10|true|
|JWT_COOKIE_NAME|The JWT token is stored on a Cookie, here you can setup this cookie name. If for some reason you need to invalidade all the sessions, you can only change the cookie name and all the old ones will be ignored be the application. The cookie used is a signed Cookie to prevent injection attacks|\__CV_APP_SESSION_0001\__|true|
|JWT_COOKIE_NAME|The JWT token is stored on a Cookie, here you can setup this cookie name. If for some reason you need to invalidate all the sessions, you can only change the cookie name and all the old ones will be ignored be the application. The cookie used is a signed Cookie to prevent injection attacks|\__CV_APP_SESSION_0001\__|true|
|REPORT_EMAIL_ADDRESS|All the problems reported by users on the application will be sent to this email address|report@email.com|true|
|NOREPLY_EMAIL_ADDRESS|A simple noreply E-Mail for application routines like password changing, for example|noreply@email.com|true|
|SOCIAL_AUTH_GITHUB_CLIENT_ID|If you intend to support github login you must fill it|""|false|
Expand All @@ -42,7 +42,7 @@ The **cvkeep-backend** environment variables are:

### The SMTP

The application SMTP configuration is used to allow the application send e-mails. If you are in local mode, you dont need to configure it, all the sent emails will be directed to the Console (STD) and wont be really sent. But in production mode you must setup it. The SMTP configuration is setted on the **MAILER_CONFIG** environment variable of your .env files (prefered the .env.production file). The env var content must be a JSON string with no line breaks like this:
The application SMTP configuration is used to allow the application send e-mails. If you are in local mode, you don't need to configure it, all the sent emails will be directed to the Console (STD) and wont be really sent. But in production mode you must setup it. The SMTP configuration is set on the **MAILER_CONFIG** environment variable of your .env files (preferred the .env.production file). The env var content must be a JSON string with no line breaks like this:

```
{ "service": "Service", "host": "smtp.service.com", "port": 465, "secure": true, "auth": { "user": "user@service.com", "pass": "p2$$w05d" } }
Expand Down
2 changes: 1 addition & 1 deletion docs/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ If everything went well, you will have a new Express Server for you CV Keep Fron

### The Server Ports

Some hosts (like Heroku for example) do manage the Node Applications Ports automatically. In this case you must ommit the "PORT" ENV var for the Backend configuration, and the "FRONT_PROD_SERVER_PORT" or "PORT" ENV var for the Frontend configuration.
Some hosts (like Heroku for example) do manage the Node Applications Ports automatically. In this case you must omit the "PORT" ENV var for the Backend configuration, and the "FRONT_PROD_SERVER_PORT" or "PORT" ENV var for the Frontend configuration.
4 changes: 2 additions & 2 deletions docs/frontend-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ The **cvkeep-frontend** environment variables are:

The JWT Token is stored on the Browser using an HTTP Signed Cookie by default. But, since the backend is a separated project from the front end, it can be running in completely different host and domain. If the CV Keep API are bering served under a different URI of the Front Matter, this Cookie will be threated as a "Thirdy Party Cookie" by the browser.

Some modern browsers are blocking thirdy party users unless the user gives an explicity permission. In this case, the login wont be possible. The solution is to use the local storage an a fallback method of cookie storage. Unfortunatelly the local storage is not as secure as the cookie due XSS attack risky. If you are using this method because your API hosting method requires thirdy party cookies to be setted on the front end, keep all your dependencies up to date and your editable content sanitazed and you will be fine.
Some modern browsers are blocking thirdy party users unless the user gives an explicity permission. In this case, the login wont be possible. The solution is to use the local storage an a fallback method of cookie storage. Unfortunately the local storage is not as secure as the cookie due XSS attack risky. If you are using this method because your API hosting method requires thirdy party cookies to be set on the front end, keep all your dependencies up to date and your editable content sanitized and you will be fine.

If you doesn't care about "Thirdy Party Cookies" fallback, or if you are hosting the API under the same address of the front end, you must set the `VUE_APP_JWT_LOCAL_STORAGE` env to "false" with no harm to the login and user session management process.

### The Front End Server

We use an Express Server to serve the front end application. You dont need this server when running the app locally, but you will probably need it to serve your production app. Also, this server is responsible to render each page SEO metatags. There is no setup to do about the front end server itself, you will see how to start it at the next section: Running Locally.
We use an Express Server to serve the front end application. You don't need this server when running the app locally, but you will probably need it to serve your production app. Also, this server is responsible to render each page SEO metatags. There is no setup to do about the front end server itself, you will see how to start it at the next section: Running Locally.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ sidebar_position: 1

# Cv Keep

Welcome to CV Keep official technical documentation. CV Keep is a **Free and Open Source Platform** intended to hold **Online Resumés**. It's completely free, pretty and simple. You can use the self-hosted version, or clone the entire project and use for your own purposes - including comercial ones - without any kind of charge or legal implications. If you intend to have an online resumé hosted by CV Keep, just go to https://cvkeep.com and create your account.
Welcome to CV Keep official technical documentation. CV Keep is a **Free and Open Source Platform** intended to hold **Online Resumés**. It's completely free, pretty and simple. You can use the self-hosted version, or clone the entire project and use for your own purposes - including commercial ones - without any kind of charge or legal implications. If you intend to have an online resumé hosted by CV Keep, just go to https://cvkeep.com and create your account.

If you want to host your own platform for any reason, keep reading this documentation. The Cv Keep plaform is entirely responsive, already internationalized (pt/en) with support to easily add new languages, SPA/PWA ready, which means its very easy to derivate a cellphone app, and much more. Cv Keep is originally created by [Felippe Regazio](http://cvkeep.com/felipperegazio) and self-hosted on Heroku.
If you want to host your own platform for any reason, keep reading this documentation. The Cv Keep platform is entirely responsive, already internationalized (pt/en) with support to easily add new languages, SPA/PWA ready, which means its very easy to derivate a cellphone app, and much more. Cv Keep is originally created by [Felippe Regazio](http://cvkeep.com/felipperegazio) and self-hosted on Heroku.
8 changes: 4 additions & 4 deletions docs/internationalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ sidebar_position: 8

# Internationalization

CV Keep is already internationalized. The application is available in PT-BR and EN, but you may want to extend the i18n options and add new languages. In this case, first lets see how the i18n is implementend on each project.
CV Keep is already internationalized. The application is available in PT-BR and EN, but you may want to extend the i18n options and add new languages. In this case, first lets see how the i18n is implemented on each project.

### Frontend

The Frontend uses the `vue-i18n` package to manage its i18n options, and uses 2 strategies to internationalize the application: global locale files and built-in i18n information for each component. This is made this way because components are lazy loaded on the pages, so a single locale json file would become huge with all the application translated texts and would never be fully used, ending up in unecessary network payload.
The Frontend uses the `vue-i18n` package to manage its i18n options, and uses 2 strategies to internationalize the application: global locale files and built-in i18n information for each component. This is made this way because components are lazy loaded on the pages, so a single locale json file would become huge with all the application translated texts and would never be fully used, ending up in unnecessary network payload.

The i18n global messages are stored on the folder `/src/shared/i18n-messages` folder. For the components, each one that needs its scoped translations has a `i18n.messages` object on its `script` layer, this way the translation payload is only loaded if the component has been loaded, lightening the network payload and the application cold start.

Expand All @@ -27,7 +27,7 @@ If you want to change something about the default i18n behavior, you must consid

All the messages and emails that the API returns or send are translated directly on the backend, then delivered. An `i18n Express Middleware` was created specially to do it, you can check all the documentation for the i18n Middleware and its behavior on this link: https://github.com/felippe-regazio/express-rest-i18n.

So, there is no backend messages on the frontend translations, and the backend doesnt send any translation key to the front end, the front and back internationalization are completely separated concerns. To specify to the API which language you want the responses, just set an `application-language` Header on your requests, the API will use this header to define the response locale. The Cv Keep Frontend will automatically handle this header for your when making requests to the API.
So, there is no backend messages on the frontend translations, and the backend doesn't send any translation key to the front end, the front and back internationalization are completely separated concerns. To specify to the API which language you want the responses, just set an `application-language` Header on your requests, the API will use this header to define the response locale. The Cv Keep Frontend will automatically handle this header for your when making requests to the API.

If you plan to change how the i18n works for the backend, or change the messages you must take a look on the root folder `/i18n`. For deeper modifications you will need to change the `i18n Express Middleware`.

Expand Down Expand Up @@ -117,7 +117,7 @@ i18n: {
</ul>
```

Dont forget to add the word "spanish" to the `i18n` object of the LangMenu component. After that 5 steps, you will be added a new language to CV Keep FrontEnd.
Don't forget to add the word "spanish" to the `i18n` object of the LangMenu component. After that 5 steps, you will be added a new language to CV Keep FrontEnd.

### Backend

Expand Down
6 changes: 3 additions & 3 deletions docs/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ furnished to do so, subject to the following conditions:
1. The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

2. You are free to derivate any kind of use from this sofware without any legal
responsability or royalties which CV Keep.
2. You are free to derivate any kind of use from this software without any legal
responsibility or royalties which CV Keep.

3. The CV Keep team are not responsible for any kind of thirdy-part use of this
3. The CV Keep team are not responsible for any kind of third-part use of this
software.

4. When derivating your own software from this one, you must NOT user the same
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CV Keep Uses a simple MEVN stack, which stands for Mongo, Express, Vue and Node.

### Environment

You just need Node JS and Mongo DB. Thats all. For Mongo, create a new database with your prefered name, then provide its Mongo URI to the app environment configuration using the ENV file. The SMTP Server is needed only in production mode. The reference for the project setup is in the next chapter.
You just need Node JS and Mongo DB. Thats all. For Mongo, create a new database with your preferred name, then provide its Mongo URI to the app environment configuration using the ENV file. The SMTP Server is needed only in production mode. The reference for the project setup is in the next chapter.

|Required|Description|
|---|---|
Expand Down
6 changes: 3 additions & 3 deletions docs/running-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ First of all, lets assume you have cloned or downloaded both the applications: *

### Backend

Lets start running the API. First of all, go to the `cvkeep-backend` project root. Now, copy the `.env` file content to a `.env.local` file, and change the env variables in according to your needings. To check how to configure the .env, please, read the [Backend Setup](/backend-setup) section of this documentation. Generally for the local mode you only need to configure your Mongo URI on the `.env.local` file. Now, if you didn't installed the dependencies, please run:
Lets start running the API. First of all, go to the `cvkeep-backend` project root. Now, copy the `.env` file content to a `.env.local` file, and change the env variables according to your needs. To check how to configure the .env, please, read the [Backend Setup](/backend-setup) section of this documentation. Generally for the local mode you only need to configure your Mongo URI on the `.env.local` file. Now, if you didn't installed the dependencies, please run:

```bash
npm install
Expand All @@ -31,7 +31,7 @@ With the default env values, your API will be available on: http://localhost:500

### Front End

To run the front end, first copy the `.env` file content to a `.env.local` file, and change the env variables in according to your needings. Now, if you didn't installed the dependencies, please run:
To run the front end, first copy the `.env` file content to a `.env.local` file, and change the env variables according to your needs. Now, if you didn't installed the dependencies, please run:

```bash
npm install
Expand All @@ -58,7 +58,7 @@ With the default env values, the front end will be available on: http://localhos

### Front End Server

There is an Express Application meant to serve the front end. This is optional when in local mode, but can be very useful for debbuging. To run the front server, just run:
There is an Express Application meant to serve the front end. This is optional when in local mode, but can be very useful for debugging. To run the front server, just run:

```bash
npm run serve:prod
Expand Down
8 changes: 4 additions & 4 deletions docs/the-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ sidebar_position: 9

# The Database

The Cv Keep Mongo Database has a very very simples structure. You can find all the models on the **cvkee-backend** project, at the folder `models`. Anyway, here is the finality of each collection:
The Cv Keep Mongo Database has a very very simples structure. You can find all the models on the **cvkeep-backend** project, at the folder `models`. Anyway, here is the finality of each collection:

|Name|Description|
|---|---|
|credentials|The user credentials as username, password etc|
|curriculum|The user curriculum content and some strucutre options|
|cvsearchindex|The searchable users and curriculumns indexed using ngrams strategy|
|forgotpass|When a user open a forget pass requisition, it will be storaged here|
|curriculum|The user curriculum content and some structure options|
|cvsearchindex|The searchable users and curriculums indexed using ngrams strategy|
|forgotpass|When a user open a forget pass requisition, it will be stored here|
|jwtsecrets|The application JWT RSA keys|
|registering|When a user starts a registration process, it will hold here till be confirmed|