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

Created Activity Feed #116

Open
wants to merge 172 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
d92a020
initial backend structure for activity post, likes, comments
AlexanderChiuy Feb 23, 2023
ab5f7fe
Correct model relations + adjust DTOs/Orchestrations
ty-labs Feb 24, 2023
a4450d7
Register data models with database
ty-labs Feb 25, 2023
1ecbdca
Update index.ts file to export repo models
ty-labs Feb 25, 2023
be6841d
Add skeleton for backend orchestrations + services
ty-labs Feb 25, 2023
f3ada7a
created activity feed client folder; mapped to it from navbar
Mar 1, 2023
8bb0301
Merge branch 'backend/activity_post' into frontend/activityfeed
ty-labs Mar 4, 2023
5c653eb
Add client implementation of ActivityPost/Comment orchestrations
ty-labs Mar 4, 2023
8774004
Fix BE user service to reflect new models
ty-labs Mar 5, 2023
d6e5b18
Add NgRx connection FE -> BE
ty-labs Mar 5, 2023
cda2b3d
Add carousel/slides to the ActivityPost
ty-labs Mar 6, 2023
cf3d4ff
like functionality implemented
AlexanderChiuy Mar 15, 2023
f4e3d0b
unlike functionality complete
AlexanderChiuy Mar 15, 2023
4d8966d
working like button
AlexanderChiuy Mar 16, 2023
456a5ae
Comments page skeleton
Bwillia2 Mar 17, 2023
b1dbffb
Prevent Full Post Re-Render on Liking, Prevent Click Spam, Fix data race
ty-labs Mar 18, 2023
c047bb6
Working to begin with except for issue in html
rgorham Mar 19, 2023
52ada48
Working test for creation
rgorham Mar 19, 2023
c3925e5
Added comment for this code block
rgorham Mar 19, 2023
db2684b
Working test for creation
rgorham Mar 19, 2023
fe89166
included imStorageUrlPipeModule
rgorham Mar 19, 2023
c9f6b08
Re-added accidently deleted files environment.ts and sp-application.s…
Mar 19, 2023
3479e9a
Add like/unlike testing for Activity-Post service
ty-labs Mar 20, 2023
1d34a60
Merge branch 'frontend/activityfeed' of github.com:involveMINT/iMPubl…
ty-labs Mar 20, 2023
54a53d5
Added modalController for comments, tried to add backend, doesn't com…
Mar 20, 2023
e97759f
Add reducer test template
ty-labs Mar 21, 2023
06e895d
Add NgRx Action Tests For ActivityPosts
ty-labs Mar 21, 2023
c3a50ca
Add NgRx Effects Testing Framework + 1 Working Test
ty-labs Mar 21, 2023
c0dcf8c
createComments dispatched but not received by server
Jareltey Mar 22, 2023
37116b3
Add comments to index.ts file, refactor hide and unhide operations in…
Jareltey Mar 22, 2023
b8cb0d6
basic display of backend comments and user comment creation
Bwillia2 Mar 22, 2023
9596bc2
Add NgRx ActivityPost Effect Tests
ty-labs Mar 23, 2023
3fc0da3
comments show handle of author's name and profile picture
Bwillia2 Mar 23, 2023
d6856ef
cleaned up some lingering POI text
AlexanderChiuy Mar 24, 2023
0e3f183
Remove dead /activitypost directory
ty-labs Mar 26, 2023
a1ee4fa
Merge pull request #33 from involveMINT/frontend/activityfeed
AlexanderChiuy Mar 27, 2023
efb4d2b
automatically create activity post from poi submission
AlexanderChiuy Mar 28, 2023
5b8d6c0
fixed small bug with activity post status 'stopped'
AlexanderChiuy Mar 28, 2023
280bc18
Merge pull request #38 from involveMINT/frontend/activityfeed
ty-labs Mar 28, 2023
ea2c0bd
Add NgRx State to Coment Modal
ty-labs Mar 29, 2023
75fa65c
added in notification digest service
AlexanderChiuy Mar 29, 2023
1822b61
Add Digest Modal Location
ty-labs Mar 29, 2023
471abe0
re-upload accidently deleted activity-post carousel
Mar 30, 2023
0988fbe
fix merge conflicts with feature/activity-feed
isong2 Mar 30, 2023
c2a6b40
first iteration notification digest
AlexanderChiuy Mar 30, 2023
a8ebf5e
Merge branch 'feature/activity-feed' into feature/notifications
ty-labs Mar 30, 2023
14fe835
Update Notification Digest UI + Scrollable
ty-labs Mar 30, 2023
74451ee
trying to get digest to show recent posts
AlexanderChiuy Mar 30, 2023
0b34b86
fixed compilation errors and merge conflicts
isong2 Mar 31, 2023
8ec43be
fixed merge conflicts 2.0
isong2 Mar 31, 2023
5169f3a
Add Digest Post Orchestration + Load Digest on Feed Start
ty-labs Mar 31, 2023
665d33f
Merge branch 'feature/notifications' of github.com:involveMINT/iMPubl…
ty-labs Mar 31, 2023
e8a6843
comment flagging implementation
Bwillia2 Mar 31, 2023
4aabb3d
Rebase and merge activity-feed into frontend/comments.
isong2 Mar 31, 2023
bdcdfc8
unflagging and one flag per user functionality
Bwillia2 Apr 3, 2023
e4428c7
Add Get Post API + Fix Notifications UI
ty-labs Apr 3, 2023
0d00206
Display activity feed in admin page
Jareltey Apr 3, 2023
f45b1d1
added flags to user service
Bwillia2 Apr 3, 2023
a64db01
Add Tests for 'Get' + 'Digest' API & NgRx
ty-labs Apr 3, 2023
46c7057
Added hi/fi comments UI and relevant functionalities
isong2 Apr 4, 2023
c01726d
Tweak Digest Modal to Display Better & Remove Viewed
ty-labs Apr 4, 2023
db16772
Hiding and unhiding functionality complete for admin
Jareltey Apr 5, 2023
9251c87
Hiding/unhiding observable to user, but ugly
Jareltey Apr 5, 2023
586cc93
Hiding/unhiding made pretty
Jareltey Apr 5, 2023
8c1a453
sms notification
AlexanderChiuy Apr 6, 2023
ae2b461
added isolated post rediration from notification page and added date …
AlexanderChiuy Apr 6, 2023
d06ace6
added flag count to admin portal, removed dead code from comments com…
Bwillia2 Apr 5, 2023
142030f
removed loader from flags. refactored comment actions for testing
Bwillia2 Apr 6, 2023
370fd19
Add Post Modal For Notifications + Track State
ty-labs Apr 6, 2023
7d08366
Merge branch 'feature/activity-feed' into feature/notifications
AlexanderChiuy Apr 7, 2023
2af29e6
rebased from feature/activity-feed branch to update moderation branch
Bwillia2 Apr 7, 2023
eb7917a
fix for gap inbetween comments when flagged comment is filtered out
Bwillia2 Apr 7, 2023
0f0b697
resolved merging issues and made UI consistent
AlexanderChiuy Apr 7, 2023
0ba4ba6
removed redundant function
AlexanderChiuy Apr 7, 2023
aba5d75
Admin moderation panel with hifi
Jareltey Apr 9, 2023
714cf29
replaced text of hidden comments to show 'this comment has been remov…
Bwillia2 Apr 9, 2023
6fe1e5e
added unit tests for comments and comment moderation
Bwillia2 Apr 9, 2023
f035bf0
fixed error related to showing removal message
Bwillia2 Apr 9, 2023
9756593
bug fix: first flagged comment now responds correctly
Bwillia2 Apr 9, 2023
6c21de1
bug fix: comment state updates when modal is closed
Bwillia2 Apr 9, 2023
a35ecb5
cleaned up leftover code
AlexanderChiuy Apr 9, 2023
f2f9276
Merge pull request #53 from involveMINT/feature/notifications
AlexanderChiuy Apr 9, 2023
37b4c1a
Merge branch 'moderation' of https://github.com/involveMINT/iMPublic …
Jareltey Apr 11, 2023
a47c39d
bug fix: comment state updates when modal is closed in admin page
Jareltey Apr 11, 2023
365540a
rebase with feature/activity-feed branch
Bwillia2 Apr 12, 2023
d81eb2b
Merge pull request #64 from involveMINT/moderation
Bwillia2 Apr 12, 2023
15cfb62
Add Functional Infinite Scroll to ActivityPost Feed (#72)
ty-labs Apr 15, 2023
80af64b
Add ActivityPost Code Documentation (#75)
ty-labs Apr 16, 2023
6e281e6
bug fix: comments show up for right post
Jareltey Apr 17, 2023
f50b731
Merge pull request #79 from involveMINT/fix/shared-comments
Jareltey Apr 17, 2023
be39521
enhanced activity feed UI to hifi with dark mode
isong2 Apr 18, 2023
bb44210
fixed bug where project title showed twice
isong2 Apr 18, 2023
329dc88
Disable like button in admin moderation
Jareltey Apr 17, 2023
4c0a1e8
Make admin moderation panel hifi
Jareltey Apr 18, 2023
241616d
Add method descriptions, remove refresh button, load more posts buggy
Jareltey Apr 18, 2023
2ded1e3
Fix minor bugs in loading more posts
Jareltey Apr 18, 2023
586e24b
Remove dead code
Jareltey Apr 18, 2023
d51236d
Copied html and css files to admin page
Jareltey Apr 18, 2023
b3c8bd0
Fix 'loadMore' Event Stuck @ 1-Page-Only Situation (#84)
ty-labs Apr 19, 2023
c5bd45c
Made admin moderation hifi work with dark mode
Jareltey Apr 19, 2023
0dc5535
Remove dead code in post.component.scss file
Jareltey Apr 20, 2023
9a2d4eb
redirect activity post project link tothe project cover page
AlexanderChiuy Apr 21, 2023
0efdd21
added badge to notification bell icon
AlexanderChiuy Apr 24, 2023
68e06f5
Merge pull request #86 from involveMINT/feature/project_cover_page
AlexanderChiuy Apr 24, 2023
ad64974
removed dead code
AlexanderChiuy Apr 24, 2023
f5ef84e
Merge pull request #91 from involveMINT/notification_chip
AlexanderChiuy Apr 24, 2023
ad1663a
Add Updates to Feed Images (#92)
ty-labs Apr 25, 2023
a5ada58
Add Default User Icon + Notifications Modal Rename
ty-labs Apr 25, 2023
d19ae98
Add Double-Touch Like/Unlike Event To Images
ty-labs Apr 25, 2023
1c6b36d
Back button for project cover page displays the correct previous page:
AlexanderChiuy Apr 25, 2023
fc6b93b
Fix Next/Prev Buttons Broken on Mobile
ty-labs Apr 25, 2023
cca4c5c
Add Chatroom When @<handle> Clicked
ty-labs Apr 25, 2023
9eea897
Remove Dead Code
ty-labs Apr 25, 2023
1eee73e
Make @<handle> Have Cursor on Hover
ty-labs Apr 26, 2023
0e9412f
Add Spacing to Images
ty-labs Apr 26, 2023
cb5aae7
added in image statistic text
AlexanderChiuy Apr 26, 2023
9e5a655
Merge pull request #93 from involveMINT/bugs/tyler-feed-ui-fixes
AlexanderChiuy Apr 26, 2023
a2511ec
Merge branch 'feature/activity-feed' into fix/project-back-button
AlexanderChiuy Apr 26, 2023
3e6fba8
Merge pull request #95 from involveMINT/fix/project-back-button
AlexanderChiuy Apr 26, 2023
ceb5d10
Add toggling for posts with flagged comments
Jareltey Apr 26, 2023
6cdc2c6
Fix bug where hiding comments when toggled to flagged comments would …
Jareltey Apr 26, 2023
650d9d3
Add space between toggle button and description
Jareltey Apr 26, 2023
8e1869e
Add missing css class
Jareltey Apr 26, 2023
2e6924d
poi image retrieval
AlexanderChiuy Apr 26, 2023
8377bfb
Update menu item name and icon
Jareltey Apr 26, 2023
3bde169
added word ellipsis for project titles, default image, truncated seco…
AlexanderChiuy Apr 27, 2023
ded051f
Fix bugs where icons disappear
Jareltey Apr 27, 2023
1c61289
Merge branch 'feature/activity-feed' into frontend/hifi-moderation
Jareltey Apr 27, 2023
d2b0cf5
Merge pull request #97 from involveMINT/frontend/hifi-moderation
Jareltey Apr 27, 2023
5151a43
Merge branch 'feature/activity-feed' into fix/poi-images
AlexanderChiuy Apr 27, 2023
eb08ee3
Remove Logging
ty-labs Apr 27, 2023
2529336
Merge pull request #100 from involveMINT/enhancement/images
AlexanderChiuy Apr 27, 2023
e7d4e3d
increased font size for desktop view
AlexanderChiuy Apr 27, 2023
bf9f151
Merge pull request #99 from involveMINT/fix/poi-images
AlexanderChiuy Apr 27, 2023
61798df
Rename activity feed to activity, redirect to activity feed on login …
Jareltey Apr 27, 2023
4c06c00
Rename headers in html to activity and comment moderation
Jareltey Apr 27, 2023
8b0142e
Fix Projects Page Data Race
ty-labs Apr 29, 2023
eee9da4
Fix Pre-Existing Chat Bug
ty-labs Apr 29, 2023
09dc91b
Merge pull request #104 from involveMINT/bugs/finals
AlexanderChiuy Apr 29, 2023
0ca284a
fixed the double icon issue
AlexanderChiuy Apr 29, 2023
168ae21
Merge pull request #105 from involveMINT/double-icon-fix
AlexanderChiuy Apr 29, 2023
6ebd3d6
Add prev/next chevrons, disable like button for multiple pois, need t…
Jareltey Apr 29, 2023
51f1cda
Overlay project statistics
Jareltey Apr 29, 2023
5dc8be8
Add css styling for ellipses and overflow
Jareltey Apr 29, 2023
568fcf3
added unit testing for moderation
Bwillia2 Apr 30, 2023
1ddbd96
made onboading banner hidden when on activity feed
Bwillia2 Apr 30, 2023
5e6af88
Merge pull request #106 from involveMINT/enhancement/admin-panel-migr…
Jareltey Apr 30, 2023
54aca8f
Merge pull request #108 from involveMINT/enhancement/banner_control+m…
Bwillia2 Apr 30, 2023
878c926
fixed sliders, style, and toggles
isong2 Apr 30, 2023
d1f0b68
fixed spacing issues, removed dead code
isong2 Apr 30, 2023
baae0a0
added desktop-specific styles
isong2 Apr 30, 2023
17ffc04
removed error message upon attempting to post empty comment
isong2 Apr 30, 2023
d9eae77
sorted comments w/ most recent at top, and autoscroll to top upon pos…
isong2 Apr 30, 2023
ac3d161
moved avatar to left for space; added hyphens for broken words
isong2 Apr 30, 2023
e27d65a
add consistency between feed and comments, default text when no comme…
isong2 Apr 30, 2023
1a40467
added light/dark mode for comments
isong2 Apr 30, 2023
011a5d1
fixed light/dark mode comment border
isong2 Apr 30, 2023
91c242d
Update admin page to match latest activity feed UI, bug in ellipses o…
Jareltey Apr 30, 2023
2c0c5b9
Merge pull request #110 from involveMINT/frontend/fix_comments
Jareltey Apr 30, 2023
0711e92
Merge pull request #111 from involveMINT/enhancement/admin-page-ui
Jareltey Apr 30, 2023
4ddf5e3
final frontend touches
AlexanderChiuy Apr 30, 2023
8f4a7a8
Merge pull request #115 from involveMINT/final_touches
AlexanderChiuy Apr 30, 2023
1db6fcd
Added environment.ts to .gitignore
wengf2086 Jul 1, 2023
f1214ec
Added package-lock.json to .gitignore
wengf2086 Jul 2, 2023
b447f50
Removed package-lock.json from .gitignore
wengf2086 Jul 11, 2023
41c01b9
Merge pull request #122 from involveMINT/remove-package-lock-from-git…
rgorham Jul 20, 2023
c57f534
Feature/add org environment file (#123)
rgorham Aug 2, 2023
49530e8
Develop (#126)
anish-sinha1 Aug 3, 2023
0d59a77
Feature/im test env init (#129)
QuinnNTonic Oct 26, 2023
c3432f5
Feature/resolving npm install issue (#130)
QuinnNTonic Nov 21, 2023
5f4c58d
Merge branch 'develop' of https://github.com/involveMINT/iMPublic int…
Nov 28, 2023
c5964d1
feat: Updates to get this branch running with the changes from dev an…
QuinnNTonic Dec 9, 2023
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
2 changes: 2 additions & 0 deletions .docker/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
create database if not exists involvemint;

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# environment file
environment.ts

# compiled output
/dist
Expand Down
122 changes: 98 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,115 @@
# Official involveMINT Web App Repository

## Setting Up Environment
## Build Prerequisites

Prerequisites:

- Nodejs
- Postgres database named `involvemint` running on localhost port 5432 with username `postgres` and password `1Qazxsw2`
- Visual Studio Code
- Node.js
- Docker

### Steps
## Steps to Set Up Environment

1. Clone repository
1. Fork and clone this repository. Ensure that you uncheck the "copy main branch only" checkbox. Once you forked the repository, clone it to a directory on your local machine and `cd` into it.

```sh
git clone [email protected]:v3/involvemint/involveMINT/involvemint2.0
```
2. Checkout the "develop" branch: `git checkout develop`.
3. Ensure you have Node.js installed. If you don't, please look at the section on [installing node.js](#installing-nodejs).
4. Ensure you have Docker installed. If you don't, please navigate to the [official website](https://docs.docker.com/get-docker/) and follow the instructions. Run `docker --version` in your terminal after it's installed to ensure you have installed everything correctly.

2. Change directory into repository
### Installing Node.js

```sh
cd involvemint2.0
```
Run the following commands.

3. Install dependencies
1. `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash`
2. `export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"`
3. `[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"`
4. Refresh your shell (close and reopen). If you're using zsh, here's a shortcut: `source ~/.zshrc`
5. If the following command does not throw an error, you're good so far: `nvm -v`
6. `nvm install --lts`
7. `nvm use --lts`

```sh
npm install
```
### Configuring Firebase

4. Start client
In order to run this code, you will need to navigate to [firebase](https://console.firebase.google.com/). You will see a screen that looks like ![firebase-landing](/assets/firebase-landing.png) and click "Create a project" (if you don't already have a GCP account and an existing project where you want to use Firebase). Once you have a project, you should see a screen like ![this](assets/firebase-dashboard.png) Once here, click the little gear and you'll see a screen that looks like ![this](assets/firebase-settings.png) Select the "Service accounts" tab and you'll see a screen that looks like ![this](assets/firebase-service-accounts.png) Hit the "Manage service account permissions" hyperlink which will take you to your GCP project. You will see a screen that looks like ![this](/assets/googlecloud-service-accounts.png). Click the account and then hit the "Keys" tab. You should see a screen that looks like ![this](/assets/service-account-keys.png). Click "Add Key" and then choose the "JSON" option to download it as a JSON file.

```sh
npx ng s
```
Ensure you are in the project directory (the directory that this file is in). Run the following command: `cp libs/shared/domain/src/lib/environments/environment.ts libs/shared/domain/src/lib/environments/environment.prod.ts` and open the new file (environment.prod.ts) in your editor. It should look like this at first:

```typescript
import { Env } from './environment.interface';

5. In another terminal, start server
const host = 'localhost';

```sh
npx ng s api
/** Develop environment variables. */
export const environment: Env = {
production: false,
test: false,
host,
apiUrl: `http://${host}:3335`,
appUrl: `http://${host}:4202`,
storageBucket: 'your storage bucket',
adminPasswordHash:
'sZfCJx5X3sGSwkokIs9IVFxDfxWd2lEKsAhkOSDfEK8u2YS98y5rJAmXmtrJs7AQ29xkHMmz0bDfLkXCKS9/+A==',
gcpApiKey: 'insert your key here',
typeOrmConfig: {
type: 'postgres',
host: '127.0.0.1',
port: 5432,
username: 'postgres',
password: '1Qazxsw2',
database: 'involvemint',
synchronize: true,
autoLoadEntities: true,
ssl: false,
},
firebaseEnv: {
apiKey: 'insert your key here',
authDomain: 'firebase auth domain',
databaseURL: '',
projectId: 'your project id',
storageBucket: 'Your project storage bucket', //your-something.appspot.com
messagingSenderId: '',
appId: 'your app id',
measurementId: 'Your measurementId',
},
// mailgun and twilio are optional
mailgun: {
apiKey: '',
domain: '',
},
twilio: {
accountSid: '',
authToken: '',
sendingPhone: '',
},
gcp: {
type: 'service_account',
project_id: 'project-id',
private_key_id: 'Your Private Key',
private_key: '-----BEGIN PRIVATE KEY-----\nYour Private Key\n-----END PRIVATE KEY-----\n',
client_email: 'Your client email',
client_id: 'client id',
auth_uri: 'https://accounts.google.com/o/oauth2/auth',
token_uri: 'https://oauth2.googleapis.com/token',
auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs',
client_x509_cert_url: 'cert url',
},
// I don't think this is used
scrypt: {
memCost: 14,
rounds: 8,
saltSeparator: 'Bw==',
signerKey: 'de/PQ/Gy53mgslvUgDUKDCgHJPArYqbFnGILLQZNe5My/CvqIThVL/CsndU8oudZ9lc4B7PT8w3sAar2/luQxA==',
},
};
```

Under the key "typeOrmConfig", please change the password field to "postgres". Under the key "gcp", please change the fields to match the fields in your service account JSON file that you just downloaded in the previous step.

### Starting the Containers

Run `docker compose up` in the root directory, which will spin up a PostgreSQL database on port 5432 and a PgAdmin UI on port 8889.

### Starting the Apps

Open a terminal and run `npm i` to install all the required packages. Once done, run `export NODE_OPTIONS=--openssl-legacy-provider` because otherwise there will be an error with OpenSSL. To start the client, run `npm run start:client`. To start the server, open a new terminal, export the same environment variable as before (`export NODE_OPTIONS=--openssl-legacy-provider`), run `npm run build`, and then `npm run start`.

For any issues, or to suggest improvements to this documentation, please contact Anish Sinha <<[email protected]>>
27 changes: 27 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
"maximumError": "10kb"
}
]
},
"org": {
"fileReplacements":[
{
"replace": "libs/shared/domain/src/lib/environments/environment.ts",
"with": "libs/shared/domain/src/lib/environments/environment.org.ts"
}
]
}
}
},
Expand All @@ -115,6 +123,9 @@
},
"test": {
"browserTarget": "involvemint:build:test"
},
"org": {
"browserTarget": "involvemint:build:org"
}
}
},
Expand Down Expand Up @@ -158,6 +169,9 @@
},
"test": {
"devServerTarget": "involvemint:serve:test"
},
"org": {
"devServerTarget": "involvemint:serve"
}
}
},
Expand Down Expand Up @@ -205,6 +219,14 @@
"with": "libs/shared/domain/src/lib/environments/environment.test.ts"
}
]
},
"org": {
"fileReplacements":[
{
"replace": "libs/shared/domain/src/lib/environments/environment.ts",
"with": "libs/shared/domain/src/lib/environments/environment.org.ts"
}
]
}
}
},
Expand All @@ -213,6 +235,11 @@
"options": {
"buildTarget": "api:build",
"port": 2324
},
"configurations": {
"org":{
"buildTarget": "api:build:org"
}
}
},
"lint": {
Expand Down
5 changes: 4 additions & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
runtime: nodejs14
runtime: nodejs16

instance_class: F4

build_env_variables:
GOOGLE_NODE_RUN_SCRIPTS: ''
2 changes: 1 addition & 1 deletion apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function bootstrap() {

// app.useWebSocketAdapter(new IoAdapter(app));

if (environment.production) {
if (environment.production || environment.test) {
const port = Number(process.env.PORT) || 8080;
await app.listen(port);
} else {
Expand Down
Binary file added assets/firebase-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/firebase-landing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/firebase-service-accounts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/firebase-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/googlecloud-service-accounts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/service-account-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.8'

services:
postgres:
hostname: postgres
container_name: postgres
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_INITDB_ARGS: '-A md5'
ports:
- '5432:5432'
volumes:
- ./.docker/init.sql:/docker-entrypoint-initdb.d/init.sql
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: involvemint
ports:
- '8889:80'
hostname: pgadmin
depends_on:
- postgres
2 changes: 1 addition & 1 deletion libs/client/admin/data-access/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './lib/admin.facade';
export { EpApplicationStoreModel, SpApplicationStoreModel } from './lib/applications/applications.reducer';
export * from './lib/client-admin-data-access.module';
export { BaPrivilegeStoreModel } from './lib/privileges/privileges.reducer';
export { BaPrivilegeStoreModel } from './lib/privileges/privileges.reducer';
5 changes: 4 additions & 1 deletion libs/client/admin/data-access/src/lib/admin.facade.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { Injectable } from '@angular/core';
import {
GrantBaPrivilegesDto,
HideCommentDto,
MintDto,
ProcessEpApplicationDto,
ProcessSpApplicationDto,
RevokeBaPrivilegesDto,
UnhideCommentDto,
} from '@involvemint/shared/domain';
import { Actions, ofType } from '@ngrx/effects';
import { select, Store } from '@ngrx/store';
import { tap } from 'rxjs/operators';
import { take, tap } from 'rxjs/operators';
import * as ApplicationsActions from './applications/applications.actions';
import * as ApplicationsSelectors from './applications/applications.selectors';
import * as CreditsActions from './credits/credits.actions';
Expand All @@ -17,6 +19,7 @@ import * as PrivilegesSelectors from './privileges/privileges.selectors';

@Injectable()
export class AdminFacade {

readonly applications = {
selectors: {
state$: this.store.pipe(select(ApplicationsSelectors.getState)).pipe(
Expand Down
4 changes: 4 additions & 0 deletions libs/client/admin/shell/src/lib/client-admin-shell.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ import { ImRoutes } from '@involvemint/shared/domain';
path: ImRoutes.admin.users.ROOT,
loadChildren: () => import('./users/users.module').then((m) => m.UsersModule),
},
{
path: ImRoutes.admin.moderation.ROOT,
loadChildren: () => import('./moderation/moderation.module').then((m) => m.AdminModerationModule),
},
]),
],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<ng-container *ngIf="state$ | async as state">

<ion-header>
<ion-toolbar>
<ion-title>
Comments
</ion-title>
<ion-buttons slot="end">
<ion-button (click)="cancel()">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>

<ion-content id="content">
<ion-list lines="none">
<ion-item *ngFor="let comment of state.comments">
<div class="comment-container">
<div class="member-handle">
<div
class="im-profile-pic medium"
*ngIf="comment.profilePicFilePath | imStorageUrl | async as url"
[ngStyle]="{ 'background-image': 'url(' + url + ')' }"
></div>
</div>
<ion-list class="comment">
<ion-label class="pointer" (click)="viewProfile(comment.handleId)" > <b>@{{ comment.handleId }}</b> </ion-label>
<ion-label class="spaced" color="medium"> {{ comment.name }} </ion-label>
<ion-label class="ion-text-wrap"> {{ comment.text }} </ion-label>
</ion-list>
</div>
<div class="flag-container">
<ion-icon [name]="comment.flagCount > 0 ? 'flag' : 'flag-outline'"></ion-icon>
</div>
<div class="flag-container">
<p>{{comment.flagCount}}</p>
</div>
<div *ngIf="!checkCommentHidden(comment)">
<ion-button class="hide-button" color="danger" (click)="hide(comment.id)">Hide</ion-button>
</div>
<div *ngIf="checkCommentHidden(comment)">
<ion-button class="unhide-button" color="medium" (click)="unhide(comment.id)">Unhide</ion-button>
</div>
</ion-item>
</ion-list>
</ion-content>

</ng-container>
Loading