Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/user type #1830

Merged
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
23 changes: 23 additions & 0 deletions .github/workflows/pull_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Copy Docs to Talawa Docs

on:
schedule:
- cron: '*/5 * * * *'
jobs:
copy-docs-to-talawa-docs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/automated-docs'
# needs: Generate-Documentation
steps:
- uses: actions/checkout@v3
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
with:
source_file: 'talawa-api-docs/'
destination_repo: 'PalisadoesFoundation/talawa-docs'
destination_branch: 'develop'
destination_folder: 'docs/'
user_email: '${{env.email}}'
user_name: '${{github.actor}}'
commit_message: 'Talawa API docs updated'
37 changes: 19 additions & 18 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
Generate-Documentation:
name: Generate Documentation
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/automated-docs'
if: github.ref == 'refs/heads/develop'
needs: Push-Workflow
steps:
- name: Checkout repository
Expand Down Expand Up @@ -150,23 +150,24 @@ jobs:
name: documentation-api
path: talawa-api-docs

Copy-docs-to-talawa-docs:
runs-on: ubuntu-latest
needs: Generate-Documentation
steps:
- uses: actions/checkout@v3
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
with:
source_file: 'talawa-api-docs/'
destination_repo: 'PalisadoesFoundation/talawa-docs'
destination_branch: 'develop'
destination_folder: 'docs/'
user_email: '${{env.email}}'
user_name: '${{github.actor}}'
commit_message: 'Talawa API docs updated'

# Copy-docs-to-talawa-docs:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/automated-docs'
# # needs: Generate-Documentation
# steps:
# - uses: actions/checkout@v3
# - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
# env:
# API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
# with:
# source_file: 'talawa-api-docs/'
# destination_repo: 'PalisadoesFoundation/talawa-docs'
# destination_branch: 'develop'
# destination_folder: 'docs/'
# user_email: '${{env.email}}'
# user_name: '${{github.actor}}'
# commit_message: 'Talawa API docs updated'

# You can find the deployment instructions in the scripts/cloud-api-demo/README.md file
Deploy-Workflow:
name: Deploying Application to Cloud VPS
Expand Down
50 changes: 27 additions & 23 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ You will need to have copies of your code on your local system. Here's how to do

## Install node.js

Best way to install and manage `node.js` is making use of node version managers. Two most popular node version managers right now are [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). We'd recommend `fnm` because it's written in `rust` and is much faster than `nvm`. Install whichever one you want and follow their guide to set up `node.js` on your system ensure the installation of Node.js version 20 LTS.
Best way to install and manage `node.js` is making use of node version managers. Two most popular node version managers right now are [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). We'd recommend `fnm` because it's written in `rust` and is much faster than `nvm`. Install whichever one you want and follow their guide to set up `node.js` on your system ensure the installation of Node.js version 20 LTS.

## Install npm

npm is a package manager for Node.js and is installed with Node.js. npm is used to install, share, and distribute code as well as to manage dependencies in your projects. To check if you have npm installed you can run this command in your terminal:

```
npm -v
```

If you have it installed then you should see the version that's installed. If not, you can download Node.js and npm from the official [Node.js website](https://nodejs.org/en/download/).

## Install TypeScript
Expand All @@ -95,6 +97,7 @@ To install TypeScript, you can use npm:
```bash
npm install -g typescript
```

This command installs TypeScript globally on your system so that it can be accessed from any project.

## Install git
Expand Down Expand Up @@ -250,7 +253,7 @@ Remember to adjust any paths or details as needed for your specific environment.

It's important to configure Talawa-API to complete it's setup.

A configuration file named `.env` is required in the root directory of `Talawa-API` for storing environment variables used at runtime. It is not a part of the repo and you will have to create it.
A configuration file named `.env` is required in the root directory of `Talawa-API` for storing environment variables used at runtime. It is not a part of the repo and you will have to create it.

## Automated Configuration of `.env`

Expand All @@ -275,27 +278,28 @@ Use this command to do this
```
cp .env.sample .env
```

### The Environment Variables in `.env`

This `.env` file must be populated with the following environment variables for talawa-api to work:

| Variable | Description |
| ---------------------------- | ------------------------------------------------------ |
| NODE_ENV | Used for providing the environment in which the the talawa-api is running |
| ACCESS_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| REFRESH_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| MONGO_DB_URL | Used for connecting talawa-api to the mongoDB database |
| RECAPTCHA_SECRET_KEY | Used for authentication using reCAPTCHA |
| RECAPTCHA_SITE_KEY | Used for authentication using reCAPTCHA |
| MAIL_USERNAME | Used for mailing service |
| MAIL_PASSWORD | Used for mailing service |
| LAST_RESORT_SUPERADMIN_EMAIL | Used for promoting the default super admin |
| COLORIZE_LOGS | Used for colorized log formats in console |
| LOG_LEVEL | Used for setting the logging level |
| REDIS HOST | Used for connecting talawa-api to the redis instance |
| REDIS_PORT | Specifies the port of the active redis-server |
| REDIS_PASSWORD(optional) | Used for authenticating the connection request to |
| | a hosted redis-server |
| Variable | Description |
| ---------------------------- | ------------------------------------------------------------------------- |
| NODE_ENV | Used for providing the environment in which the the talawa-api is running |
| ACCESS_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| REFRESH_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| MONGO_DB_URL | Used for connecting talawa-api to the mongoDB database |
| RECAPTCHA_SECRET_KEY | Used for authentication using reCAPTCHA |
| RECAPTCHA_SITE_KEY | Used for authentication using reCAPTCHA |
| MAIL_USERNAME | Used for mailing service |
| MAIL_PASSWORD | Used for mailing service |
| LAST_RESORT_SUPERADMIN_EMAIL | Used for promoting the default super admin |
| COLORIZE_LOGS | Used for colorized log formats in console |
| LOG_LEVEL | Used for setting the logging level |
| REDIS HOST | Used for connecting talawa-api to the redis instance |
| REDIS_PORT | Specifies the port of the active redis-server |
| REDIS_PASSWORD(optional) | Used for authenticating the connection request to |
| | a hosted redis-server |

The following sections will show you how to configure each of these parameters.

Expand Down Expand Up @@ -532,7 +536,6 @@ If the parameter value is set to `true`, you should be able to see colorized log

There are different logging levels that can be configured by setting this parameter. The severity order of levels are displayed numerically ascending from most important to least important.


```
levels = {
error: 0,
Expand Down Expand Up @@ -571,8 +574,9 @@ You can pass the following arguments while running this script.

- `npm run import:sample-data`: This command will import the complete sample database without removing the existing data.
- `npm run import:sample-data -- --format`: This command will import the complete sample database after removing the existing data.
- `npm run import:sample-data -- --format --items=users,organizations`: This command will import the sample `users` and `organizations` collections after cleaning the existing data.
- `npm run import:sample-data -- --items=users,organizations`: This command will import the sample `users` and `organizations` collections without cleaning the existing data.
- `npm run import:sample-data -- --format --items=users,organizations,appUserProfiles`: This command will import the sample `users` , `organizations` and `appUserProfiles` collections after cleaning the existing data.
- `npm run import:sample-data -- --items=users,organizations,appUserProfiles`: This command will import the sample `users` , `organizations`
ans `appUserProfiles` collections without cleaning the existing data.

## Sample Data Overview:

Expand Down Expand Up @@ -769,4 +773,4 @@ Talawa-api makes use of `vitest` to run tests because it is much faster than `je

You can run the tests for talawa-api using this command:

npm run test
npm run test
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ Core features include:

<!-- toc -->

- [Talawa API](#talawa-api)
- [Talawa Components](#talawa-components)
- [Documentation](#documentation)
- [Installation](#installation)
- [Image Upload](#image-upload)
- [Talawa Components](#talawa-components)
- [Documentation](#documentation)
- [Installation](#installation)
- [Image Upload](#image-upload)

<!-- tocstop -->

Expand Down
Loading
Loading