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

Reading and Writing Profile Info From Ceramic #943

Merged
merged 131 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
d6b1b80
adding IDX basic profile & removing erroring options in tsc config 🧣
dysbulic Nov 16, 2021
7bbc2b8
removing tsBuildInfoFile 🧞
dysbulic Nov 22, 2021
16cf430
avoiding error of unknown arguments in the config 🏄
dysbulic Nov 29, 2021
16a9bce
updating and adding components for Glaze to function 🌰
dysbulic Nov 29, 2021
f234e48
migrating for IDX to Glaze & loopifying crypto accounts ownership 🐊
dysbulic Nov 29, 2021
77a0382
loading account ownerships from Ceramic & renaming foreign key 💐
dysbulic Nov 30, 2021
24f6588
tracing execution fixing readability along the way 🧳
dysbulic Nov 30, 2021
35088c5
adding pattern to create IPFS subdomain links 🐚
dysbulic Nov 30, 2021
c308e1b
removing IDX 🌼
dysbulic Nov 30, 2021
5f68409
updating Ceramic libraries & removing IDX 🌭
dysbulic Nov 30, 2021
c0e61d4
removing duplicated tag 🎢
dysbulic Nov 30, 2021
341b154
function to generate bafy….ipfs.dweb.link subdomain-style IPFS links 🎤
dysbulic Nov 30, 2021
d9b193e
reenabling incremental build post a tooling update 🎠
dysbulic Nov 30, 2021
ca23970
added program to generate document id for an extended schema ⚔
dysbulic Nov 30, 2021
39aaca8
`incremental` is in the base config 🕷
dysbulic Nov 30, 2021
cc5a150
camel casing GraphQL variables for player table 🐧
dysbulic Nov 30, 2021
135b7dc
tweaking sizes to be more visually balanced 🍾
dysbulic Nov 30, 2021
e9f62b1
removing static sizes in favor of viewBoxes 🛸
dysbulic Nov 30, 2021
f37e1be
fixing permissions on pronouns 🌡
dysbulic Nov 30, 2021
c997bba
correcting capitalization 🧵
dysbulic Nov 30, 2021
fcc5e81
switching from JavaScript interpolation to URL templates 🥫
dysbulic Nov 30, 2021
1e1f937
missed variables in the player camel casing 🐫
dysbulic Nov 30, 2021
4f02254
cleaning up editing flow 🧛
dysbulic Nov 30, 2021
2d97fae
adding file upload for profiles
onefinney Dec 1, 2021
172b4b3
camel casing profile fields & removing color_aspect join 📼
dysbulic Dec 1, 2021
aa641b2
lotsa work on the profile editing flow & some styling 🌋
dysbulic Dec 1, 2021
1422764
intermittently I get the following error & reinstalling @typescript-e…
dysbulic Dec 1, 2021
8e7c95c
battling typescript & eslint to get this pushed 🧁
dysbulic Dec 1, 2021
a91e373
moved to packages/web/pages/api/storage.tsx 🧠
dysbulic Dec 1, 2021
5877005
removing route & library used by Express web3.storage proxy 🎗
dysbulic Dec 1, 2021
3b0d949
fixing linting errors 🐔
dysbulic Dec 1, 2021
e700ac7
fixing eslint confusion 🎣
dysbulic Dec 1, 2021
8ddf56b
modifying db seeding to work with unmodified production endpoint 🏭
dysbulic Dec 6, 2021
1dba781
disabling default parser to get busboy to work 🥘
dysbulic Dec 6, 2021
95af957
preparing to upgrade React to see if it fixed react-hook-form 💺
dysbulic Dec 6, 2021
2293946
updating to React 17.0.2 for react-form-hook ⚾
dysbulic Dec 6, 2021
74a7871
upgrading react-form-hook from v6 to v7 🎡
dysbulic Dec 7, 2021
81e628d
migrating style definitions to a common location 🎯
dysbulic Dec 7, 2021
0e28f7a
prettying readability & fixing basic profile saving 👄
dysbulic Dec 7, 2021
588f19f
web3.storage proxy proxying successfully 📢
dysbulic Dec 7, 2021
6d165a2
removing 3box
onefinney Dec 7, 2021
b476482
debugged player image loading
onefinney Dec 8, 2021
77b43bb
styling time zone select 💈
dysbulic Dec 13, 2021
b0e0414
adding test program to retrieve profile 📺
dysbulic Dec 13, 2021
a66e9a7
camel-casing quest properties 🍒
dysbulic Dec 13, 2021
6305f1f
camelCasing rather than CapitalCasing stylesheets 🚕
dysbulic Dec 13, 2021
ce3386d
https://stackoverflow.com/a/64940811/264008 & https://stackoverflow.c…
dysbulic Dec 13, 2021
2e8945d
capitalizing MetaGame & refactoring WYSIWYG editor for TypeScript 🗞
dysbulic Dec 13, 2021
5e5c33e
fleshing out the extended profile schema for Ceramic 🥨
dysbulic Dec 14, 2021
4036eb1
moving fields to profile table & finalizing schema (closes #919) 💴
dysbulic Dec 14, 2021
d41bd8e
many many typing changes post moving username from player to player.p…
dysbulic Dec 14, 2021
c22bafe
committing to push to @tenfinney ⚛
dysbulic Dec 14, 2021
38835a0
fixed hasura permissions
onefinney Dec 14, 2021
c783611
adding loading ExtendedProfile
onefinney Dec 14, 2021
de358fa
pushing type changes to @tenfinney 🥏
dysbulic Dec 14, 2021
f40c05d
progressing on creating an extended profile
tenfinney Dec 15, 2021
5014d3c
switching player info accessors, Player type from fragment, & profile…
dysbulic Dec 21, 2021
f10c2d7
git stash pop to see if it resolves a bizarre typescript error 🎮
dysbulic Dec 21, 2021
5d4841c
pushing to @tenfinney
dysbulic Dec 21, 2021
e00bc51
refining types for timezones
onefinney Dec 22, 2021
eebebd3
fixing the typing on the time zone selector 🕰
dysbulic Dec 22, 2021
aa81b96
moving availability to profile table & cleaning up time zone typing 🍫
dysbulic Dec 22, 2021
553cb53
moving time zone to the profile table 🐠
dysbulic Dec 22, 2021
df9388c
moving color disposition to profile table 🌭
dysbulic Dec 26, 2021
5d31e20
renaming player.playerType → profile.explorerType 🍾
dysbulic Dec 27, 2021
477c193
mobile tweaks & hunting a caching bug 🥊
dysbulic Dec 27, 2021
0a5cf71
updating GraphQL schema 🥦
dysbulic Jan 5, 2022
916b648
resolving typecheck errors 🀄
dysbulic Jan 5, 2022
d54bbf0
removing circular dependency 🧟
dysbulic Jan 5, 2022
88851e7
💮 yarn lint --fix
dysbulic Jan 5, 2022
7de303e
trying to isolate why the dashboard won’t display 🎰
dysbulic Jan 11, 2022
3c58715
solving react-dom error, prettying leaderboard & SEED display, & fixi…
dysbulic Jan 11, 2022
e00a504
regenrating schema & removing player.type 🌅
dysbulic Jan 12, 2022
dd28740
🚢 yarn lint --fix
dysbulic Jan 12, 2022
010e5d2
updating node to v16 🥍
dysbulic Jan 12, 2022
a7712eb
fixing type errors in the Discord bot 🏤
dysbulic Jan 12, 2022
45a3d78
increasing timeout on getXP test 🌶
dysbulic Jan 12, 2022
5e2aa15
failed attempt to convert the Discord bot to ESM 🎯
dysbulic Jan 12, 2022
07f0d86
fixing ESM require & attempting to redeploy on push to a PR 🧁
dysbulic Jan 12, 2022
f292891
trying to get PR deployment to function again 🚜
dysbulic Jan 12, 2022
69566d4
seeing if caching is causing old code to be deployed 🍵
dysbulic Jan 12, 2022
d1e5c07
printing some GitHub Action debug info 🚋
dysbulic Jan 12, 2022
b98f937
attempting to pull the HEAD for the PR 🧱
dysbulic Jan 12, 2022
826f4cb
changing hashfiles input to try and get a rebuild 🍥
dysbulic Jan 12, 2022
4ab8e2c
migrating node-fetch to utils & cleaning up references 🗝
dysbulic Jan 12, 2022
d94456e
readding the installation of node-fetch for seeding 🇧🇹
dysbulic Jan 12, 2022
644a5c0
variablizing the Google Cloud deployment GitHub Action 🎊
dysbulic Jan 12, 2022
3eef333
testing variable references 💼
dysbulic Jan 12, 2022
52c8ce7
more testing variable references 🍖
dysbulic Jan 12, 2022
a7e0872
still more testing variable references 🍞
dysbulic Jan 12, 2022
60c9a84
yet more testing variable references 🎺
dysbulic Jan 12, 2022
6b92dad
I broke the deployment script. ¿Does this fix it? 🧖
dysbulic Jan 12, 2022
d6f5b2e
more testing on GitHub 🏘
dysbulic Jan 12, 2022
eb0d3b8
piping to $GITHUB_ENV 📉
dysbulic Jan 12, 2022
41724b1
adding an `env.` prefix to everything 🎼
dysbulic Jan 12, 2022
088f334
testing env section within jobs 🗨
dysbulic Jan 12, 2022
b677ea2
typo 🤑
dysbulic Jan 12, 2022
66afcc1
retrying GITHUB_ENV for setting 🎭
dysbulic Jan 12, 2022
793b3c8
this makes no sense whatsoever 🏚
dysbulic Jan 12, 2022
8a59411
partitioning 🎑
dysbulic Jan 12, 2022
828c6df
trying multi-step interpolation 🚸
dysbulic Jan 12, 2022
4a9f4a0
moving the password generation to an earlier step 🐮
dysbulic Jan 12, 2022
1ac54f7
splitting Cloud Run env variables & printing seeding urls ⛽
dysbulic Jan 12, 2022
8e5faa3
passing GraphQL endpoint to frontend 🔎
dysbulic Jan 12, 2022
879cdce
correctly namespacing GraphQL endpoint 🛸
dysbulic Jan 12, 2022
2bb5ad5
switching Hasura link from GraphQL endpoint to base host 🎁
dysbulic Jan 13, 2022
42021dd
removing durplicate CORS entry & switching to HTTPS Ceramic 🧸
dysbulic Jan 17, 2022
d79988d
getting yarn typecheck && yarn lint to succeed 🏰
dysbulic Jan 17, 2022
ee1e148
replacing Ceramic endpoint & camel casing profile_layout 🦠
dysbulic Jan 17, 2022
a85604d
switching responsive grid to columns 🏺
dysbulic Jan 17, 2022
edc209b
silencing linter on unused vars 🕊
dysbulic Jan 17, 2022
442e236
fixing upsert value overwriting bug 🌐
dysbulic Jan 17, 2022
9f6da21
rate limiting seeding process, Imgix optimizing images, & migrating h…
dysbulic Jan 18, 2022
e98a396
fixing missing TextDecoder for cids package 🐧
dysbulic Jan 18, 2022
1552fac
passing web3.storage token to backend & improving erroring 🕯
dysbulic Jan 18, 2022
52ea739
missed line continuation 🎲
dysbulic Jan 18, 2022
3d48041
passing imgix token
onefinney Jan 18, 2022
f190c0c
fixed user profile loader spinner & new user creation
onefinney Jan 18, 2022
43d6064
sorting Next'js's & GCP's environment variables & updating docs 🗞
dysbulic Jan 19, 2022
905e55c
added rate limiting to seeding script for Cloud Run 🌤
dysbulic Jan 19, 2022
b27a3a3
installing bottleneck for seeding job ⛸
dysbulic Jan 19, 2022
31bedf9
adding /me page for direct profile access 🎍
dysbulic Jan 24, 2022
aef9ef3
profile edit form mobile formatting & fixed player type search
dysbulic Jan 24, 2022
3ff48ab
🍳 yarn typecheck && yarn lint
dysbulic Jan 24, 2022
f21456c
tweaking mobile display & removing duplicate entries in players list 💇
dysbulic Jan 24, 2022
24a4c7d
🍯 yarn typecheck && yarn lint
dysbulic Jan 24, 2022
9a8ef1d
mobile display fixes & prepping to fork to add jotai 🚒
dysbulic Jan 24, 2022
73f7d69
setting max-width on profile editing form 🥁
dysbulic Jan 24, 2022
dbe9edb
🥐 yarn typecheck && yarn lint
dysbulic Jan 25, 2022
fe3b65f
standardizing Ceramic URL environment variables 🚏
dysbulic Jan 25, 2022
ed53f5e
🐄 yarn typecheck && yarn lint
dysbulic Jan 25, 2022
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
6 changes: 5 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ DATABASE_NAME=metagame-db
HASURA_GRAPHQL_ADMIN_SECRET=metagame_secret
HASURA_PORT=8080

# packages/web
# packages/web/.env
NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_INFURA_ID=781d8466252d47508e177b8637b1c2fd
NEXT_PUBLIC_GRAPHQL_URL=http://localhost:8080/v1/graphql # use https://api-staging.metagame.wtf/v1/graphql for staging backend
NEXT_BRIGHTID_APP_URL=https://app.brightid.org
NEXT_BRIGHTID_NODE_URL=http:%2f%2fnode.brightid.org
NEXT_PUBLIC_VERCEL_URL=http://localhost:3000
WEB3_STORAGE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweGE0OWIyMGIyMzVGY2E3N0QzRURlZWFDMzlDODkyZkVENmUzOTU5OTQiLCJpc3MiOiJ3ZWIzLXN0b3JhZ2UiLCJpYXQiOjE2MzA3MDMyMDg0ODEsIm5hbWUiOiJNeU1ldGEifQ.q7_i_XmkIMb6_6u9pNI6tkNUq0vhiJ0e1oV8GLdeez0
NEXT_PUBLIC_CERAMIC_URL=https://ceramic-clay.3boxlabs.com
NEXT_PUBLIC_CERAMIC_NETWORK=testnet-clay

# packages/discord-bot
GRAPHQL_URL=http://localhost:8080/v1/graphql
FRONTEND_URL=http://localhost:3000


# packages/backend
IMGIX_TOKEN=
# GITHUB_API_TOKEN= # IMPORTANT! create one at https://github.com/settings/tokens
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.eslintrc.js
83 changes: 83 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
module.exports = {
root: true,
extends: [
'airbnb-base',
'airbnb-typescript/base',
'airbnb/hooks',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'prettier',
],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
ecmaVersion: 6,
},
ignorePatterns: ['packages/web/next.config.js'],
plugins: ['simple-import-sort'],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',

// Doesn't work for FC: https://github.com/yannickcr/eslint-plugin-react/issues/2353
'react/prop-types': 'off',

// Prefer non-default exports
'import/no-default-export': 'off',
'import/prefer-default-export': 'off',

// Auto-sort imports
'sort-imports': 'off',
'import/order': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',

// unary operators are ok
'no-plusplus': 'off',

// Using a type system makes it safe enough to spread props
'react/jsx-props-no-spreading': 'off',

// we want to be able to use functions before definition
'@typescript-eslint/no-use-before-define': 'off',

'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
minimumDescriptionLength: 5,
},
],
'no-bitwise': 'off',
},
overrides: [
{
// assuming Next.js application
files: '**/pages/**/*.{ts,tsx}',
rules: {
'react/react-in-jsx-scope': 'off', // react is a global in this folder
'import/no-default-export': 'off', // pages have to have a default export
'import/prefer-default-export': 'off',
'@typescript-eslint/explicit-module-boundary-types': [
// So we can infer prop types
'warn',
{ allowedNames: ['getStaticProps'] },
],
},
},
{
files: ['**/*.stories.*'],
rules: {
// Storybook requires default exports for stories
'import/no-default-export': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
],
parser: '@typescript-eslint/parser',
};
83 changes: 0 additions & 83 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/PR-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- uses: actions/cache@v2
with:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- uses: actions/cache@v2
with:
Expand Down
Loading