-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Updated operation documentation #3475
Merged
palisadoes
merged 3 commits into
PalisadoesFoundation:develop-postgres
from
palisadoes:docs
Jan 28, 2025
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
id: introduction | ||
title: Introduction | ||
slug: /developer-resources/introduction | ||
sidebar_position: 1 | ||
--- | ||
|
||
Welcome to the Talawa-Admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
id: operation | ||
title: Operation | ||
slug: /developer-resources/operation | ||
sidebar_position: 3 | ||
--- | ||
|
||
## Introduction | ||
|
||
This section covers how Talawa Admin operates | ||
|
||
Coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
id: testing | ||
title: Testing | ||
slug: /developer-resources/testing | ||
sidebar_position: 4 | ||
--- | ||
|
||
## Introduction | ||
|
||
It is important to test our code. If you are a contributor, please follow these steps. | ||
|
||
### Running tests | ||
|
||
You can run the tests for `talawa-admin` using this command: | ||
|
||
```bash | ||
npm run test | ||
|
||
``` | ||
|
||
### Debugging tests | ||
|
||
You can see the output of failing tests in broswer by running `jest-preview` package before running your tests | ||
|
||
```bash | ||
npm run jest-preview | ||
npm run test | ||
|
||
``` | ||
|
||
You don't need to re-run the `npm run jest-preview` command each time, simply run the `npm run test` command if the Jest Preview server is already running in the background, it'll automatically detect any failing tests and show the preview at `http://localhost:3336` as shown in this screenshot - | ||
|
||
![Debugging Test Demo](../../../static/img/markdown/installation/jest-preview.webp) | ||
|
||
### Linting code files | ||
|
||
You can lint your code files using this command: | ||
|
||
```bash | ||
npm run lint:fix | ||
``` | ||
|
||
### Husky for Git Hooks | ||
|
||
We are using the package `Husky` to run git hooks that run according to different git workflows. | ||
|
||
##### pre-commit hook | ||
|
||
We run a pre-commit hook which automatically runs code quality checks each time you make a commit and also fixes some of the issues. This way you don't have to run them manually each time. | ||
|
||
If you don't want these pre-commit checks running on each commit, you can manually opt out of it using the `--no-verify` flag with your commit message as shown:- | ||
|
||
```bash | ||
git commit -m "commit message" --no-verify | ||
``` | ||
|
||
##### post-merge hook | ||
|
||
We are also running a post-merge(post-pull) hook which will automatically run "npm install" only if there is any change made to pakage.json file so that the developer has all the required dependencies when pulling files from remote. | ||
|
||
If you don't want this hook to run, you can manually opt out of this using the `--no-verify` flag while using the merge command `git pull`: | ||
|
||
```bash | ||
git pull --no-verify | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
id: troubleshooting | ||
title: Operation | ||
slug: /developer-resources/troubleshooting | ||
sidebar_position: 5 | ||
--- | ||
|
||
## Introduction | ||
|
||
Coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
id: operation | ||
title: Operation, Registration & Login | ||
slug: /operation | ||
sidebar_position: 2 | ||
--- | ||
|
||
This page outlines how to successfully operate the application | ||
|
||
## Operation | ||
|
||
Operation of the application requires these steps. | ||
|
||
### Running Talawa-Admin | ||
|
||
Run the following command to start `talawa-admin` development server: | ||
|
||
```bash | ||
npm run serve | ||
|
||
``` | ||
|
||
### Accessing Talawa-Admin | ||
|
||
By default `talawa-admin` runs on port `4321` on your system's localhost. It is available on the following endpoint: | ||
|
||
``` | ||
|
||
http://localhost:4321/ | ||
|
||
``` | ||
|
||
If you have specified a custom port number in your `.env` file, Talawa-Admin will run on the following endpoint: | ||
|
||
``` | ||
|
||
http://localhost:{{customPort}}/ | ||
|
||
``` | ||
|
||
Replace `{{customPort}}` with the actual custom port number you have configured in your `.env` file. | ||
|
||
## Registration | ||
|
||
The first time you navigate to the running talawa-admin's website you'll land at talawa-admin registration page. Sign up using whatever credentials you want and create the account. Make sure to remember the email and password you entered because they'll be used to sign you in later on. | ||
|
||
## Login | ||
|
||
The login process is different depending on the scenario | ||
|
||
### Normal Login | ||
|
||
Now sign in to talawa-admin using the `email` and `password` you used to sign up. | ||
|
||
### First Time API Administrator Login | ||
|
||
The email address and password are defined these API environment variables: | ||
|
||
1. `API_ADMINISTRATOR_USER_EMAIL_ADDRESS` | ||
1. `API_ADMINISTRATOR_USER_NAME` | ||
1. `API_ADMINISTRATOR_USER_PASSWORD` | ||
|
||
In a development environment, the defaults are: | ||
|
||
1. `API_ADMINISTRATOR_USER_EMAIL_ADDRESS`[email protected] | ||
1. `API_ADMINISTRATOR_USER_NAME`=administrator | ||
1. `API_ADMINISTRATOR_USER_PASSWORD`=password | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add security warning for default credentials.
The documentation should emphasize that these are development-only credentials and should never be used in production.
📝 Committable suggestion