Skip to content

Commit

Permalink
Fix Developer Dashboard Deploys (#787)
Browse files Browse the repository at this point in the history
* update remote branch #598

* update remote branch #598

* created the login page

* fix(ui): fix element issue using chakra ui Box component

* fix(ui): fix element issue using chakra ui Box component

* fix(ui): fix element issue using chakra ui Box component

* chore: add User info component #619

* chore: add User info component #619

* chore: update User info component #619

* add developer information fetch method #627

* add developer information fetch route #627

* Update src/controllers/developers.js

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* Update src/controllers/developers.js

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* add developer utils constant #627

* chore: add developer function helpers, update validateApiKey middleware #627

* add authorization middleware  #627

* chore: fix up authorization middleware, update findDeveloper helper #627

* chore: update getDeveloper method #627

* Update src/controllers/developers.js

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* use single quotes

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: move developers controller method to developers folder #627

* chore: move developerUtils functions to developers/utils #627

* chore: revert isSameDate() #627

* chore: add developer details test #627

* chore: update get developer test #627

* chore: update dev error message - use single quotes

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: update comment

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: update error message handler

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: update utils.js - checkDeveloperAPIKey helper #627

* chore: update utils.js - checkDeveloperAPIKey helper remove all res #627

* chore: update utils.js - remove Express arguments #627

* chore: fix helper functions import bugs #627

* chore: update helper functions #627

* chore: update authorization middleware and getDeveloper controller #627

* chore: complete developer details tests #627

* chore: finish developer information endpoint tests #627

* chore: change res.locals to req.locals

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: update createDeveloper command - remove comments #627

* chore: update developer document retrieval test #627

* chore: checkDeveloperApiKey -> checkAPILimit #627

* chore: update gitignore #627

* chore: update find developer method #627

* chore: update developer document return test method #627

* chore: remove success message from getDeveloper method #627

* chore: update validateAPIKey middleware, create global PROD_LIMIT variable #627

* chore: update validateAPIKey middleware and utils  #627

* Update src/middleware/authorization.js

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* Update src/middleware/authorization.js

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: remove prettierignore #627

* chore: update firebase.json #627

* chore: update developer utils #627

* Update API limit error message

Co-authored-by: Ijemma Onwuzulike <[email protected]>

* chore: update error message #627

* chore: update authorization middleware error handler #627

* chore: update autorization middleware #627

* chore: update developer test #627

* chore: resolve all changes #627

* chore: fix firebase.json #627

* chore: revert changes #627

* chore: update validate API key middleware #627

* chore: update API key validation check - remove double quotes #627

* chore: update API key validation check - remove double quotes #627

* chore(antd): remove antd

* chore: convert js to tsx

* chore: use layout route for nested routes

* chore: authorize developer requests

* chore: create tests for dashaboard and navbar

* test: create tests for DeveloperAPI

* chore: fix TS errors

* chore: specify page routes to handle test files while building

* chore: use Firebase Id to fetch developer

* chore: use Firebase Id to fetch developer

* test: create test for developerAuthorization middleware

* chore: create credentials profile page for developer dashboard

* feat(pricing): create pricing page

* chore: extend developer schema to include plan

* feat: support stripe checkout and portal sessions

* chore: update stripe submission form

* chore: update types and create new AccountStatus enum

* feat(stripe): add stripe support to pay for different tier

* chore: cosmetic changes to footer

* chore: make homepage more responsive and fix scrolling bug

* chore: improve the design and ux for navigation bar

* chore: change background color of dashboard to light gray

* chore: enable firebase admin by providing credentials

* chore: fallback to creating a developer if it doesnt exist

* fix: use name instead of displayName when updating developer

* chore: reduce title size on homepage

* chore: clean up basic functionality of developer dashboard

* chore: remove Button dependencies in Plans

* test: change 404 error to 403 for developer authorization

* test: fix frontend and backend jest tests

* chore: match package.json files and fix production logic for Firebase

* chore: fix merge

* chore: stop referring to backend's isProduction variable

---------

Co-authored-by: davydocsurg <[email protected]>
Co-authored-by: Joel <[email protected]>
  • Loading branch information
3 people authored Jun 15, 2024
1 parent 0700b52 commit b881097
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
"dotenv": "^16.0.3",
"express": "^4.17.1",
"express-rate-limit": "^5.2.3",
"firebase": "^10.11.1",
"firebase-admin": "^12.1.0",
"firebase": "^10.12.2",
"firebase-admin": "^12.1.1",
"firebase-functions": "^5.0.1",
"firebase-tools": "^13.8.0",
"framer-motion": "^5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import {
requestFixture,
responseFixture,
nextFunctionFixture,
} from '../../../../__tests__/shared/fixtures';
} from '../../../__tests__/shared/fixtures';
import {
getDeveloper,
getDeveloperByFirebaseId,
postDeveloper,
postDeveloperHelper,
putDeveloper,
} from '../../developers';
import Plan from '../../../shared/constants/Plan';
} from '../developers';
import Plan from '../../shared/constants/Plan';

class Developer {
local = {};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { hash } from 'bcrypt';
import { v4 as uuid } from 'uuid';
import { Document, FilterQuery, Types } from 'mongoose';
import { isProduction, CLIENT_TEST, isTest } from '../../config';
import { developerSchema } from '../../models/Developer';
import { createDbConnection } from '../../services/database';
import { Developer as DeveloperType, MiddleWare } from '../../types';
import { sendNewDeveloper } from '../email';
import { isProduction, CLIENT_TEST, isTest } from '../config';
import { developerSchema } from '../models/Developer';
import { createDbConnection } from '../services/database';
import { Developer as DeveloperType, MiddleWare } from '../types';
import { sendNewDeveloper } from './email';

const TEST_EMAIL = '[email protected]';
// If a Developer account is created by a user creating an
Expand Down
3 changes: 1 addition & 2 deletions src/services/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import firebaseSdkConfig from '../../firebase.json';
import { PRODUCTION_FIREBASE_CONFIG, STAGING_FIREBASE_CONFIG } from './firebaseConfigs';

const apps = getApps();
const isProduction =
typeof window !== 'undefined' ? window?.location?.host === 'igboapi.com' : false;
const isProduction = process.env.NODE_ENV === 'production';

let currentApp;
// Initialize Firebase
Expand Down

0 comments on commit b881097

Please sign in to comment.