Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a906de3
Add IP address to join request
alexander2001i Feb 5, 2021
c59f96d
Maybe fix lint action
alexander2001i Feb 5, 2021
b7397b3
Maybe fix lint action
alexander2001i Feb 5, 2021
60a62b6
Use the IP on card creation, on join payment and on subscription payment
alexander2001i Feb 5, 2021
85ba55a
Fix tests
alexander2001i Feb 5, 2021
0286414
Create admin app
alexander2001i Feb 5, 2021
16fa45f
Move the .gitignore config
alexander2001i Feb 5, 2021
69b9336
WIP
alexander2001i Feb 8, 2021
5e6d965
WIP
alexander2001i Feb 8, 2021
3f15665
Dashboard Homepage
alexander2001i Feb 8, 2021
d7f9e74
WIP
alexander2001i Feb 8, 2021
72fc486
GraphQL goodness
alexander2001i Feb 8, 2021
e094a53
WIP
alexander2001i Feb 9, 2021
3f4fba8
Commons gql
alexander2001i Feb 9, 2021
e08a001
WIP
alexander2001i Feb 9, 2021
11fc0f9
Fix the thrid page
alexander2001i Feb 10, 2021
d6b39b9
Common detaisl page
alexander2001i Feb 10, 2021
f9e733b
Theme switcher
alexander2001i Feb 10, 2021
1ea67ba
One proposal
alexander2001i Feb 10, 2021
43db7db
wip
alexander2001i Feb 10, 2021
8deda30
Get commons proposals, paginated
alexander2001i Feb 10, 2021
1531929
See description
alexander2001i Feb 11, 2021
31ce64e
See description
alexander2001i Feb 11, 2021
88094a8
Placeholders
alexander2001i Feb 11, 2021
e3898a1
labels
alexander2001i Feb 11, 2021
2a2260a
Maybe fix texts
alexander2001i Feb 11, 2021
ab8fc24
Maybe fix eslint
alexander2001i Feb 11, 2021
607b76f
Remove console.logs
alexander2001i Feb 11, 2021
4da4af1
Rule bending
alexander2001i Feb 11, 2021
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
121 changes: 121 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"root": true,
"ignorePatterns": [
"*.md",
"*.json",
"*.yml",
"*.sh",
"functions/dist/**",
"*.test.ts"
],
"parserOptions": {
// Required for certain syntax usages
"ecmaVersion": 2018
},
"env": {
"amd": true,
"node": true,
"es6": true
},
"plugins": [
"promise"
],
"extends": "eslint:recommended",
"rules": {
// Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
"no-regex-spaces": "off",
// Removed rule "disallow the use of debugger" from recommended eslint rules
"no-debugger": "off",
// Removed rule "disallow unused variables" from recommended eslint rules
"no-unused-vars": "off",
// Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
"no-mixed-spaces-and-tabs": "off",
// Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
// Warn against template literal placeholder syntax in regular strings
"no-template-curly-in-string": 1,
// Warn if return statements do not either always or never specify values
"consistent-return": 1,
// Require the use of === and !==
"eqeqeq": 2,
// Disallow the use of alert, confirm, and prompt
"no-alert": 2,
// Disallow the use of arguments.caller or arguments.callee
"no-caller": 2,
// Disallow null comparisons without type-checking operators
"no-eq-null": 2,
// Disallow the use of eval()
"no-eval": 2,
// Warn against extending native types
"no-extend-native": 1,
// Warn against unnecessary calls to .bind()
"no-extra-bind": 1,
// Warn against unnecessary labels
"no-extra-label": 1,
// Disallow leading or trailing decimal points in numeric literals
"no-floating-decimal": 2,
// Warn against shorthand type conversions
"no-implicit-coercion": 1,
// Warn against function declarations and expressions inside loop statements
"no-loop-func": 1,
// Disallow new operators with the Function object
"no-new-func": 2,
// Warn against new operators with the String, Number, and Boolean objects
"no-new-wrappers": 1,
// Disallow throwing literals as exceptions
"no-throw-literal": 2,
// Require using Error objects as Promise rejection reasons
"prefer-promise-reject-errors": 2,
// Enforce “for” loop update clause moving the counter in the right direction
"for-direction": 2,
// Enforce return statements in getters
"getter-return": 2,
// Disallow await inside of loops
"no-await-in-loop": 2,
// Disallow comparing against -0
"no-compare-neg-zero": 2,
// Warn against catch clause parameters from shadowing variables in the outer scope
"no-catch-shadow": 1,
// Disallow identifiers from shadowing restricted names
"no-shadow-restricted-names": 2,
// Enforce return statements in callbacks of array methods
"callback-return": 2,
// Require error handling in callbacks
"handle-callback-err": 2,
// Warn against string concatenation with __dirname and __filename
"no-path-concat": 1,
// Prefer using arrow functions for callbacks
"prefer-arrow-callback": 1,
// Return inside each then() to create readable and reusable Promise chains.
// Forces developers to return console logs and http calls in promises.
"promise/always-return": 2,
//Enforces the use of catch() on un-returned promises
"promise/catch-or-return": 2,
// Warn against nested then() or catch() statements
"promise/no-nesting": 1,

// This is temporary rule that we should remove on later stage
"@typescript-eslint/no-var-requires": 0,

// Console usage is not allowed. Use logger instead
"no-console": 2
},
"overrides": [
{
"files": [
"**/*.ts",
"**/*.tsx"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0
}
}
]
}
6 changes: 5 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ types:
- packages/types/**/*

app:
- packages/app/**/*
- packages/app/**/*

admin:
- packages/admin/**/*
- packages/firebase/functions/src/core/admin/**/*
5 changes: 5 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"color": "5319E7",
"description": "The item is related to the firebase code"
},
{
"name": "admin",
"color": "5319E7",
"description": "The item is related to the admin frontend or backend code"
},
{
"name": "app",
"color": "0E8A16",
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/firebase-lint-worflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@ on:
push:
paths:
- 'packages/firebase/**'
- 'packages/types/**'
branches:
- main
- main/firebase
- main/app
pull_request:
paths:
- 'packages/firebase/**'
- 'packages/types/**'
branches:
- main
- main/firebase
- main/app

jobs:
eslint:
Expand Down Expand Up @@ -44,5 +38,6 @@ jobs:
- name: Lint
uses: bradennapier/eslint-plus-action@v3.4.2
with:
rulePaths: packages/firebase/
includeGlob: "packages/firebase/**/*"
github-token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -537,4 +537,25 @@ $RECYCLE.BIN/
**/firestore/data/firestore_export

# Web Ignores
packages/build
packages/build

.pnp
.pnp.js

# testing
/coverage

# next.js
.next/

# production
build

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
34 changes: 34 additions & 0 deletions packages/admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
11 changes: 11 additions & 0 deletions packages/admin/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
overwrite: true
schema: "./schema.gql"
documents: "src/**/*.tsx"
generates:
src/graphql.tsx:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
config:
withHooks: true
2 changes: 2 additions & 0 deletions packages/admin/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
38 changes: 38 additions & 0 deletions packages/admin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "admin",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"codegen": "graphql-codegen --config codegen.yml"
},
"dependencies": {
"@apollo/client": "^3.3.8",
"@geist-ui/react": "^2.1.0-canary.2",
"@geist-ui/react-icons": "^1.0.1",
"graphql": "^15.5.0",
"next": "10.0.6",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-loading-skeleton": "^2.1.1"
},
"eslintConfig": {
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
"react/display-name": 0,
"react/prop-types": 0,
"@typescript-eslint/interface-name-prefix": 0
}
},
"devDependencies": {
"@graphql-codegen/cli": "1.20.1",
"@graphql-codegen/typescript": "1.20.2",
"@graphql-codegen/typescript-operations": "1.17.14",
"@graphql-codegen/typescript-react-apollo": "2.2.1"
}
}
Binary file added packages/admin/public/favicon.ico
Binary file not shown.
Loading