Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
642 commits
Select commit Hold shift + click to select a range
50f282a
Removed unnecessary checks
quent043 Feb 16, 2024
736bf89
WIP Prisma Typing
quent043 Feb 16, 2024
ebb3e37
WIP Prisma Typing
quent043 Feb 16, 2024
9051b70
Refactor
quent043 Feb 16, 2024
7fe6592
Added Form Readme
quent043 Feb 16, 2024
7f517f3
Extracted Card Component
quent043 Feb 19, 2024
1164176
Added new menu enriching hook
quent043 Feb 20, 2024
b366e58
Added new menu enriching hook
quent043 Feb 20, 2024
6fedbd6
Added new navigation type
quent043 Feb 20, 2024
dc14f9a
Added check on zero address
quent043 Feb 21, 2024
aa584cb
Added null check
quent043 Feb 21, 2024
9cf73ea
Added job condition checks hook
quent043 Feb 21, 2024
43efb16
Optimized hook
quent043 Feb 21, 2024
e29cb23
Updated create page
quent043 Feb 21, 2024
f602392
COnditioncard
quent043 Feb 21, 2024
0890631
Finalized create component with conditions etc.
quent043 Feb 21, 2024
74975c9
Added comment
quent043 Feb 22, 2024
637963a
Fixed check conditions hook
quent043 Feb 22, 2024
ab8b328
Fixed check conditions hook
quent043 Feb 22, 2024
3ad1138
Extracted hook
quent043 Feb 22, 2024
2c90da1
Extracted hook
quent043 Feb 22, 2024
90b6382
Added missing tmp values in form
quent043 Feb 22, 2024
d870b4c
Updated PostingConditionsCars
quent043 Feb 22, 2024
c41c01e
Added token Sign
quent043 Feb 22, 2024
3dd4303
Added async button
quent043 Feb 22, 2024
5a570cf
Updated ConditionsStatusCard .tsx
quent043 Feb 22, 2024
2d4456a
Updated ConditionsStatusCard .tsx
quent043 Feb 22, 2024
50985f4
Updated ConditionsStatusCard .tsx
quent043 Feb 22, 2024
982af86
Updated ConditionsStatusCard .tsx
quent043 Feb 22, 2024
0b9d0b2
Finalized ConditionsStatusCard .tsx
quent043 Feb 22, 2024
2508c67
Finalized ConditionsStatusCard .tsx
quent043 Feb 22, 2024
08a5c00
Renames vars
quent043 Feb 23, 2024
78cae39
Extracted uting config file for job chains
quent043 Feb 23, 2024
9ff2136
Extracted uting config file for job chains
quent043 Feb 23, 2024
bba07bd
Global refactor
quent043 Feb 23, 2024
38913ae
Added parsed minimum amount
quent043 Feb 26, 2024
fe10b82
Changes type name
quent043 Feb 27, 2024
9095a8d
Changes type name
quent043 Feb 27, 2024
d2985dc
Added latform Mint (require new SDK update)
quent043 Feb 28, 2024
2ec22c5
Fixed typos
quent043 Feb 28, 2024
5b5da56
Added existing platform check
quent043 Mar 1, 2024
2b9b1bc
Added hook
quent043 Mar 1, 2024
060e4f3
Modified react hook used
quent043 Mar 1, 2024
1f1b58f
Added chain config to stay ISO with viem standards
quent043 Mar 1, 2024
9c173be
Added init condition
quent043 Mar 1, 2024
489fe01
Added platform filter for services
quent043 Mar 1, 2024
3ac08f1
Added fees config
quent043 Mar 1, 2024
a874a75
updgrade tl sdk
0xRomain Mar 4, 2024
a5916b3
add security check for BP collaborator to update
0xRomain Mar 4, 2024
bcf5736
refresh context user after creation
0xRomain Mar 4, 2024
abf480a
fix custom domain query
0xRomain Mar 4, 2024
baddee7
upgrade sdk
0xRomain Mar 4, 2024
fb6b1af
remove jobConditions + fix palette
0xRomain Mar 4, 2024
87cf1fa
remove graph call to get id + fix subdomain to have full url + fix pa…
0xRomain Mar 4, 2024
d25fc7c
add final redirect
0xRomain Mar 4, 2024
08aeb58
rename param
0xRomain Mar 4, 2024
e9908b8
fix platform creation step
0xRomain Mar 4, 2024
a379fb8
Replaces TLId by TlHandle in context data fetch
quent043 Mar 5, 2024
18703b9
Added handle lock in create-profile
quent043 Mar 5, 2024
25eb14c
Removed unused stuff
quent043 Mar 5, 2024
62aa682
Renamed var
quent043 Mar 5, 2024
0aa3ea5
Fixed condition
quent043 Mar 5, 2024
823c04d
Externalized PlatformNameInput.tsx
quent043 Mar 5, 2024
c44a72c
Renamed var
quent043 Mar 5, 2024
f52096a
Added 1 block confirmation for adding delegate
quent043 Mar 6, 2024
8075c8f
Added Platform Delegate function
quent043 Mar 6, 2024
6a48ce3
Added Platform Delegate function
quent043 Mar 6, 2024
ffcfca1
Added checkAvailability hook
quent043 Mar 6, 2024
de13c50
Added delegate call to platform moint
quent043 Mar 6, 2024
0d583e0
Added utils functions
quent043 Mar 6, 2024
ab74d2f
Added delegate check
quent043 Mar 6, 2024
170dd9c
Added todos
quent043 Mar 6, 2024
67b8914
Removed unused Notifs
quent043 Mar 7, 2024
cb71dbe
Fixed TL Context
quent043 Mar 7, 2024
2302177
Added filter to graph query
quent043 Mar 7, 2024
df03c8c
Added new API for filtered services
quent043 Mar 7, 2024
312aca6
Optimized hook
quent043 Mar 7, 2024
14e2ef2
Add Posthog (#70)
CreedsCode Mar 7, 2024
3a07aa4
Merge branch 'v2' of github.com:TalentLayer-Labs/builder-space into B…
0xRomain Mar 7, 2024
344582b
add default value to prevent issue when not defined
0xRomain Mar 7, 2024
a281d2b
fix check availability
0xRomain Mar 7, 2024
299f5d6
remove lowerCase transform
0xRomain Mar 7, 2024
8278514
Added css + submit button logic
quent043 Mar 8, 2024
aa2d8aa
Added condition on value check when existing on chain data
quent043 Mar 8, 2024
685f48b
Replaced url for onboarding
quent043 Mar 8, 2024
cf48ef0
Added menu loader ===> Not Working
quent043 Mar 8, 2024
96d0705
Added async in hook
quent043 Mar 8, 2024
56acaef
Added missing param in MenuBottom.tsx
quent043 Mar 8, 2024
595071a
Added null check
quent043 Mar 8, 2024
ca3a536
Added Default for jobPostingConditions
quent043 Mar 8, 2024
456e1cf
new default value jobConditions migration
0xRomain Mar 8, 2024
c3d4e07
add validation for subdomain
0xRomain Mar 8, 2024
6f24ed1
add automatic switch network
0xRomain Mar 8, 2024
dfa2c58
fix error display
0xRomain Mar 8, 2024
197e1f2
make talentLayerId mandatory and not nullable
0xRomain Mar 8, 2024
5d76843
Modified format
quent043 Mar 10, 2024
c23da55
Added new route for delegate mint
quent043 Mar 10, 2024
d7dc6bc
Added delegate logic
quent043 Mar 10, 2024
1d923f9
Updates Platform route
quent043 Mar 11, 2024
e21b121
Updated utils function
quent043 Mar 11, 2024
af8e8ca
Updates type
quent043 Mar 11, 2024
d39a5f2
Updated platform create function
quent043 Mar 11, 2024
f0eb509
Added error case
quent043 Mar 11, 2024
ea3e144
Case id from bigint to string
quent043 Mar 11, 2024
a65bff3
Finalized create platform hook
quent043 Mar 11, 2024
a68614a
Update hook
quent043 Mar 11, 2024
c659ec9
Updated menu
quent043 Mar 11, 2024
f5e9f93
CSS
quent043 Mar 11, 2024
0f15dda
talentLayerPlatformId non nullable
quent043 Mar 11, 2024
918ea9f
Removed platform Name
quent043 Mar 11, 2024
847bfe8
Updates
quent043 Mar 11, 2024
cd23b9f
Updates
quent043 Mar 11, 2024
9d6a205
clean duplicate migrations
0xRomain Mar 11, 2024
60f5c78
Updated toast function
quent043 Mar 12, 2024
adf7b8e
upgrade formik
0xRomain Mar 12, 2024
b085d39
fix and otpimize handle field async validation
0xRomain Mar 12, 2024
74c4fa3
Merge branch 'BP-118_JobPostingConditions' of https://github.com/Tale…
quent043 Mar 13, 2024
d2c6173
Added natspec
quent043 Mar 13, 2024
e5544d5
Added new create service route + utils
quent043 Mar 13, 2024
2bdb78f
switch ipfs post from infura to quicknode
0xRomain Mar 14, 2024
325a485
Merge branch 'BP-118_JobPostingConditions' of github.com:TalentLayer-…
0xRomain Mar 14, 2024
f271a6d
apply switch ipfs post from infura to quicknode to main
0xRomain Mar 14, 2024
a6a3506
cherry-pick f271a6d6ba0f917ca396742f0b7580e5211e7d0a
0xRomain Mar 14, 2024
a6ee276
Fixed Context issue
quent043 Mar 14, 2024
2a9fb11
Removed toLowerCase()
quent043 Mar 14, 2024
b0313cb
Rename
quent043 Mar 14, 2024
e671d22
Merge pull request #74 from TalentLayer-Labs/ipfs-migration
0xRomain Mar 14, 2024
45a1e50
add missing server side initial query
0xRomain Mar 14, 2024
c5d08b5
remove message
0xRomain Mar 14, 2024
7f17f3d
add min constraint on rate amount
0xRomain Mar 14, 2024
580e670
adjsut colors
0xRomain Mar 14, 2024
046bf00
fix proposals query
0xRomain Mar 14, 2024
0ae72a8
fix input handle color
0xRomain Mar 15, 2024
882711d
clean dark rules
0xRomain Mar 15, 2024
c593c7d
adjust margin
0xRomain Mar 15, 2024
23b5304
adjust margin
0xRomain Mar 15, 2024
8658156
adjust margin
0xRomain Mar 15, 2024
46876b1
desactive email
0xRomain Mar 15, 2024
87d5faf
fix render on mobile
0xRomain Mar 15, 2024
0451652
fix margin
0xRomain Mar 15, 2024
a2991ac
Added doc on delegation
quent043 Mar 15, 2024
d3c76c8
hide email notif
0xRomain Mar 18, 2024
2329160
remove help popover
0xRomain Mar 18, 2024
f697f7c
add debug
0xRomain Mar 18, 2024
4febaff
remove verify email
0xRomain Mar 18, 2024
658d266
add debug
0xRomain Mar 18, 2024
be3cb08
Replaced condition
quent043 Mar 19, 2024
b9f2a61
Added updateHook
quent043 Mar 19, 2024
4901a5b
Added createHook
quent043 Mar 19, 2024
d08038a
Clean Form
quent043 Mar 19, 2024
376bef8
Updated hooks
quent043 Mar 19, 2024
510e3ca
Renamed variable
quent043 Mar 19, 2024
246be3c
Renamed variable
quent043 Mar 19, 2024
8b78ef5
Added update route for service
quent043 Mar 19, 2024
f0f7335
Update
quent043 Mar 19, 2024
a55359c
Updated text
quent043 Mar 20, 2024
c46319b
Renamed env var
quent043 Mar 20, 2024
e15d5de
Added condition
quent043 Mar 20, 2024
6b00001
Renamed context var
quent043 Mar 20, 2024
670d975
Errors utils
quent043 Mar 20, 2024
1c52cfb
Less logs
quent043 Mar 20, 2024
7a02fd6
Added query material
quent043 Mar 20, 2024
7a669f5
Added canedit condition
quent043 Mar 20, 2024
a5385ea
Removed owner filter
quent043 Mar 20, 2024
9a8876c
Refactored sideMenu
quent043 Mar 20, 2024
aeb5c25
Added error toast material
quent043 Mar 20, 2024
209b79b
CanEdit service
quent043 Mar 20, 2024
7038570
Removed filter by owner
quent043 Mar 20, 2024
cc80d3a
Added func
quent043 Mar 20, 2024
4685186
Create service route
quent043 Mar 20, 2024
9d9df31
Update service route
quent043 Mar 20, 2024
2cdfa55
Added create proposal hook
quent043 Mar 20, 2024
60428d4
Added create proposal route
quent043 Mar 20, 2024
463681d
Added update proposal route
quent043 Mar 20, 2024
412f6c6
Clean form
quent043 Mar 20, 2024
8f56b33
Update hook
quent043 Mar 20, 2024
8dd0816
Update
quent043 Mar 20, 2024
8c82e66
Added worker onboarding
quent043 Mar 20, 2024
334aacb
Added custom condition
quent043 Mar 20, 2024
372af88
Added dependance to update menu when switching account
quent043 Mar 21, 2024
7a289fa
Added Payment route / hook
quent043 Mar 21, 2024
ab03527
Modified redirect route
quent043 Mar 21, 2024
5d9d219
Modified redirect route
quent043 Mar 21, 2024
08671e4
Payment hook
quent043 Mar 21, 2024
4e45706
Modifier button name
quent043 Mar 21, 2024
201cbb6
Added review V2 hook / route etc.
quent043 Mar 21, 2024
93738b8
Clean hook
quent043 Mar 21, 2024
cfc6520
Replaces BP platform id in context
quent043 Mar 21, 2024
cd588de
Fixed condition
quent043 Mar 22, 2024
a50340d
Extracted card
quent043 Mar 22, 2024
01a99e4
Changed redirect if no profile
quent043 Mar 23, 2024
6e7e081
Added getServisideProps function
quent043 Mar 23, 2024
eda1f18
Updated layout display
quent043 Mar 23, 2024
396195e
Added conditions to submit button
quent043 Mar 23, 2024
6c35360
https => http
quent043 Mar 23, 2024
acac587
Updated hook
quent043 Mar 25, 2024
0ceaf30
CSS
quent043 Mar 25, 2024
ef91004
Unused var
quent043 Mar 25, 2024
e3ead10
Typo
quent043 Mar 25, 2024
37037a0
Global work
quent043 Mar 25, 2024
4f3fe89
Global work
quent043 Mar 25, 2024
bee5e56
Added platformID to dlegate mint
quent043 Mar 25, 2024
1b0cc36
Data from DB
quent043 Mar 25, 2024
cfa1de0
Changed address to TLID for check data in delegate APIs
quent043 Mar 25, 2024
4a8259c
Added onchain data refresh after onboarding
quent043 Mar 25, 2024
79950f4
Removed toLowerCase
quent043 Mar 26, 2024
377c01f
Added contributor type
quent043 Mar 26, 2024
73174c4
Added material to ServiceItem.tsx
quent043 Mar 26, 2024
dda248b
Changed Text
quent043 Mar 26, 2024
65f072e
Refactored and fixed ValidateProposalModal.tsx
quent043 Mar 26, 2024
5ec2774
Added material to payment modal
quent043 Mar 26, 2024
66cbb76
Missing data
quent043 Mar 26, 2024
c58b407
Refactored refresh button
quent043 Mar 27, 2024
c025bc4
Added scrollbar
quent043 Mar 27, 2024
ee286d4
Added conditional view
quent043 Mar 27, 2024
80cb1cf
add v2 doc
0xRomain Mar 28, 2024
6dcbef9
Merge pull request #72 from TalentLayer-Labs/BP-118_JobPostingConditions
0xRomain Mar 28, 2024
30121e9
Merge branch 'main' of github.com:TalentLayer-Labs/builder-space into v2
0xRomain Mar 28, 2024
1c7ac27
fix lint
0xRomain Mar 28, 2024
966129e
fix platformId when no builderPlace defined
0xRomain Mar 28, 2024
4b1bc75
update v2 doc
0xRomain Mar 28, 2024
41e3a6e
fix platformId
0xRomain Mar 28, 2024
3cb4394
remove condition that prevent onboarding to work properly
0xRomain Mar 28, 2024
4bd32d2
fix onboarding notif condition + fix onboarding connect block
0xRomain Mar 28, 2024
b57bca3
fix platform configure: subdomain & palette
0xRomain Mar 28, 2024
bf8f3d6
add todo
0xRomain Mar 28, 2024
34b8418
remove useless title
0xRomain Mar 28, 2024
64339d1
fix click and prevent form submit
0xRomain Mar 28, 2024
577a876
fix typo
0xRomain Mar 28, 2024
196454a
update todo
0xRomain Mar 28, 2024
d5be3e8
Fixed data name issue
quent043 Mar 28, 2024
0a9dc3a
WIP
quent043 Mar 28, 2024
50ab099
Merge branch 'BP-118_JobPostingConditions' of https://github.com/Tale…
quent043 Mar 28, 2024
f1679e7
fix lint
0xRomain Mar 28, 2024
c2b09cb
WIP
quent043 Mar 28, 2024
5966571
WIP
quent043 Mar 28, 2024
01feb0a
Pull v2
quent043 Mar 28, 2024
08a0f61
update doc
0xRomain Mar 28, 2024
5ee81bd
Merge pull request #75 from TalentLayer-Labs/BP-118_JobPostingConditions
0xRomain Mar 28, 2024
8c3f799
ignore lint error
0xRomain Mar 28, 2024
ebea765
fix delegation flow
0xRomain Mar 28, 2024
99121bc
adjust style
0xRomain Mar 28, 2024
4bdc587
add log for delegate
0xRomain Mar 28, 2024
9b107c4
Refactored routes
quent043 Mar 28, 2024
991c096
Merge pull request #76 from TalentLayer-Labs/v2-q_version
0xRomain Mar 28, 2024
388b76e
remove gig tag for now
0xRomain Mar 28, 2024
40c3e1e
update button text
0xRomain Mar 28, 2024
905586c
fix title
0xRomain Mar 28, 2024
88d0d06
Merge pull request #77 from TalentLayer-Labs/v2-clean-code
0xRomain Mar 28, 2024
0a7b822
update navigation
0xRomain Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 34 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ========== DEBUG ==============
NEXT_PUBLIC_ACTIVE_DEBUG=false
NEXT_PUBLIC_ACTIVATE_DEBUG=false

# ========== CONNECT ==============
NEXT_PUBLIC_WALLECT_CONNECT_PROJECT_ID=xxxxx
Expand All @@ -9,10 +9,9 @@ NEXT_PUBLIC_DEFAULT_CHAIN_ID=80001
NEXT_PUBLIC_PLATFORM_ID=4

# ========== IPFS ==============
NEXT_PUBLIC_INFURA_ID=xxxxx
NEXT_PUBLIC_INFURA_SECRET=xxxxxx
NEXT_PUBLIC_IPFS_BASE_URL=https://ipfs.io/ipfs/
NEXT_PUBLIC_IPFS_WRITE_URL=https://ipfs.infura.io:5001
NEXT_PUBLIC_IPFS_WRITE_URL=https://api.quicknode.com/ipfs/rest/v1/s3/put-object
NEXT_PUBLIC_IPFS_SECRET=xxxxx

# ========== SIGNATURE ==============
NEXT_PUBLIC_SIGNATURE_API_URL=
Expand All @@ -23,17 +22,19 @@ NEXT_PUBLIC_BACKEND_RPC_URL=https://rpc-mumbai.maticvigil.com/v1/xxxxxxxxxxxxxxx
NEXT_PUBLIC_MESSENGING_ENV='dev'

## ========== DATABASE ==============
NEXT_MONGO_URI="mongodb+srv://xxxxx:yyyyy@xxx"
DATABASE_URL="postgres://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-REF].supabase.co:5432/postgres"

# ========== DELEGATION ==============
## Active the delegate feature for service / proposal / release / review (the proposal validation won't be delegate)
NEXT_PUBLIC_ACTIVE_DELEGATE=false
## Active the delegate feature for minting ID - will call a backend api and call the smartcontract function mintForAddress
NEXT_PUBLIC_ACTIVE_DELEGATE_MINT=false
## Activate the delegate feature for service / proposal / release / review (the proposal validation won't be delegate)
NEXT_PUBLIC_ACTIVATE_DELEGATE=false
## Activate the delegate feature for minting ID - will call a backend api and call the smartcontract function mintForAddress
NEXT_PUBLIC_ACTIVATE_DELEGATE_MINT=false
## This seed phrase is only used for delegate purpose
NEXT_PRIVATE_DELEGATE_SEED_PHRASE="add you seed phrase here only for delegate purpose"
## Public address
NEXT_PUBLIC_DELEGATE_ADDRESS="0xaddyouraddresshereonlyfordelegatepurpose"
## Automatically activate delegation to BuilderPlace when minting a TLid
NEXT_PUBLIC_ACTIVATE_DELEGATE_ON_MINT="false"

# ========== OPEN DATA APIs ==============
NEXT_PUBLIC_WORKX_API_URL=https://api.workpi.com/graphql
Expand All @@ -46,9 +47,32 @@ NEXT_PRIVATE_OPENAI_API_KEY=xxx
NEXT_PRIVATE_LEAPAI_API_KEY=xxx

# ========== WEB3MAIL ==============
NEXT_PUBLIC_ACTIVE_WEB3MAIL=false
NEXT_WEB3MAIL_PLATFORM_PRIVATE_KEY="xaddyouprivatekeyhere"
NEXT_PUBLIC_WEB3MAIL_PLATFORM_PUBLIC_KEY="0x27FDabe8222d7f874406F3EaBBb9601D87EF1a82"
NEXT_PUBLIC_WEB3MAIL_APP_ADDRESS="web3mail.apps.iexec.eth"
CRON_SECRET="xxx"
NEXT_WEB3MAIL_RETRY_FACTOR=5

# ========== MAIL NOTIFICATIONS ==============
# "web2" or "web3"
NEXT_PUBLIC_EMAIL_MODE=web2

# ========== Multidomain ==============
NEXT_PUBLIC_ROOT_DOMAIN=localhost:3000
NEXT_CLOUDFLARE_TOKEN=xxx

# ========== Vercel ==============
# Vercel authentication token that can be found here: https://vercel.com/account/tokens
NEXT_PRIVATE_AUTH_BEARER_TOKEN=
# Vercel Project ID that can be found here: https://vercel.com/<org>/<project>/settings
NEXT_PRIVATE_PROJECT_ID_VERCEL=
# Vercel Team ID that can be found here: https://vercel.com/teams/<org>/settings
NEXT_PRIVATE_TEAM_ID_VERCEL=

# ========== Sendgrid ==============
NEXT_PRIVATE_SENDGRID_VERIFIED_SENDER=
NEXT_PRIVATE_SENDGRID_API_KEY=

# ========== Posthog ==============
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ dist-ssr

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
.vercel
37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
# StarterKit
# BuilderPlace

A Ready to Use NextJS dapp using [TalentLayer](https://docs.talentlayer.org/).

## Start building in few seconds

### Basic configuration
- Fork the code
- Clone your new repository
- Copy .env.example file into a new .env file: `cp .env.example .env`
- Minimum required configuration:
- NEXT_PUBLIC_PLATFORM_ID: use 4, the default value, or [create your own platform](https://docs.talentlayer.org/get-a-platform-id) to setup your custom fees and more:
- Minimum required configuration:
- NEXT_PUBLIC_PLATFORM_ID: use 4, the default value, or [create your own platform](https://docs.talentlayer.org/get-a-platform-id) to setup your custom fees and more:
- NEXT_PUBLIC_WALLECT_CONNECT_PROJECT_ID: Create a free account on [wallet connect and get your project ID](https://cloud.walletconnect.com/)
- NEXT_PUBLIC_INFURA_ID & NEXT_PUBLIC_INFURA_SECRET: used to post on IPFS, create a free account on [Infura here](https://www.infura.io/product/ipfs)
- For more advanced configuration [check the official doc](https://docs.talentlayer.org/technical-guides/starterkit-setup)
- NEXT_PUBLIC_INFURA_ID & NEXT_PUBLIC_INFURA_SECRET: used to post on IPFS, create a free account on [Infura here](https://www.infura.io/product/ipfs)
- DATABASE_URL: create a postgres in two clicks here [with supabase](https://supabase.com)
- For more advanced configuration [check the official doc](https://docs.talentlayer.org/technical-guides/builderplace-setup)
- Use the recommended node version: `18^`, if you are using nvm just run: `nvm use`
- Install the dependencies: `npm install`
- Run local server for development `npm run dev`
- That's it!

### GasLess Transactions / Delegation (optional)
To activate gasless transactions and delegation you will need a dedicated Seed & Address which will be used to execute transactions on behalf of your users, and set the following environment variables:

- Set NEXT_PRIVATE_DELEGATE_SEED_PHRASE: Dedicated Seed phrase for your delegate
- Set NEXT_PUBLIC_DELEGATE_ADDRESS: Address of your delegate
- Add matic to NEXT_PUBLIC_DELEGATE_ADDRESS: To pay for transactions on behalf of your users
- Set NEXT_PUBLIC_ACTIVATE_DELEGATE_MINT to true
- If you wish to give the user the option to directly add your backend delegator to new users during onboarding set NEXT_PUBLIC_ADD_DELEGATE_MINT_ADDRESS to "true"

To use this feature your Users will need to activate delegation by calling the following function on the TalentLayerId smart contract:
```solidity
/**
* @notice Allows to give rights to a delegate to perform actions for a user's profile
* @param _profileId The TalentLayer ID of the user
* @param _delegate Address of the delegate to add
*/
function addDelegate(uint256 _profileId, address _delegate);
```

## 🛠️ TalentLayer

TalentLayer is an open protocol and dev toolkit for hiring applications. You can use it to build platforms that leverage a unified decentralized backend for job posts, escrow, user profiles, and reputations.
Expand All @@ -31,7 +52,7 @@ TalentLayer is an open protocol and dev toolkit for hiring applications. You can

## 🗨 XMTP

XMTP is an open protocol and dev toolkit for messaging applications. You can use it to build peer-to-peer messaging
XMTP is an open protocol and dev toolkit for messaging applications. You can use it to build peer-to-peer messaging

### Developer Resources

Expand All @@ -43,10 +64,10 @@ XMTP is an open protocol and dev toolkit for messaging applications. You can use

## ✉️ IExec - Web3mail

Web3mail is a decentralized email service built by IExec which allows a platform to send emails to a user without knowing the email address of the user.
Web3mail is a decentralized email service built by IExec which allows a platform to send emails to a user without knowing the email address of the user.

### Developer Resources

**Iexec Documentation:** [Read here.](https://tools.docs.iex.ec/tools/dataprotector)

**Technical TalentLayer integration documentation:** [Read here.](https://docs.talentlayer.org/third-party-modules/iexec-web3mail)
**Technical TalentLayer integration documentation:** [Read here.](https://docs.talentlayer.org/third-party-modules/iexec-web3mail)
63 changes: 63 additions & 0 deletions docs/delegate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Delegates

## Overview

Delegation is an action of allowing a used to execute on-chain transactions on your behalf.
TalentLayer implemented delegation on the TalentLayerId contract, which allows a user to add ETH addresses as delegates, which will have on-chain rights to execute certain functions on behalf of the user.


On BuilderPlace, we use delegation for 2 different cases:

- **CollaboratorDelegate**: A platform owner can add other users as sub-admins for the platform, which are called Collaborators. When adding a collaborator, the owner will add the collaborator's address as delegate to his own TalentLayer Id, so that the collaborator can create services or reviews using the owner's Id.
- **BackendDelegate**: A user can add our backend as a delegate in to let it execute transactions on his behalf, and save gas fees.

### Collaborator Delegate

From: BuilderPlace collaborators page
The new collaborator must have a BuilderPlace profile and TalentLayer id

- The Owner inputs the address of the new collaborator
- Its address will be added on-chain to the Platform owner's delegates
- The Owner can then remove a collaborator, its address will be removed on-chain


### Backend Delegate

IF the user does not have a TalentLayer Id yet:
- From: Onboarding
- When the user registers as a Platform User, if the NEXT_PUBLIC_ACTIVATE_DELEGATE_MINT environment variable is set to true, then if he does not have a TalentLayer Id yet, it will be minted and transferred by our backend to the user, and our backend will add its address as a delegate of the user.

IF the user already has a TalentLayer Id during onboarding, it will not be activated at this step.
- From: Dashboard
- He will have the possibility to add our backend as a delegate


### Worker onboarding

- From:
- case 1: BuilderPlace worker page
- case 2: if a worker want to apply to a job
- Step 1: Complete the "create your profile" form
- It creates the user in DB
- And create a TLid linked to the address if the user don't have one yet
- Note: this step is automatically skipped if the user already have a TLid
- On success:
- Case 1: Redirect to his dashboard
- Case 2: Redirect to the job page


### Hirer onboarding

- From a given BuilderPlace, i the hirer want to post a job
- Step 1: Complete the "create your profile" form
- It creates the user in DB
- And create a TLid linked to the address if the user don't have one yet
- Note: this step is automatically skipped if the user already have a TLid
- On success: Redirect to the create job page

## TalentLayerId

- A TalentLayerId is a unique identifier that is linked to an address
- We will mint the TLid for the user automatically during onboarding.
- In case the user already have a TLid, we will link it to his profile in DB
- Important: In case something goes wrong, the user can create a TLid manually from the dashboard or anytime he try to execute his first onchain action
69 changes: 69 additions & 0 deletions docs/platforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Platforms
aka Builer Place (aim to rename it to Platform)

## Onboarding

We have 2 types of platform on Builder Place that are different due to their posting jobPostingConditions

| Platform Type | allowPosts | Description | Fees |
| --- | --- | --- | --- |
| Market Place | TRUE | User create his own market where he can allow others to post following his conditions. He can define his own fees rules. | Custom |
| Company Place | FALSE | User create a place only for his own posts | Default |

### JobPostingConditions

```javascript
interface JobPostingConditions {
allowPosts: boolean;
conditions?: PostingCondition[];
}

type PostingCondition = NFTCondition | TokenCondition;

interface NFTCondition {
type: 'NFT';
address: string; // Address of the NFT contract
}

interface TokenCondition {
type: 'Token';
address: string; // Address of the token contract
minimumAmount: number; // Minimum amount of tokens required
}
```

### Market Place

- TalentLayer: this one got his own TalentLayerPlatformId. It will allow to customize fees...
- Job posting conditions:
- Public: allow others
- Condition: allow only someone who owns an NFT or a certain amount of tokens


### Company Place

- TalentLayer: this one use the default builderPlace TalentLayerPlatformId.


## TODO

- [x] update db schema, add jobPostingConditions
- Complete new onboarding with step 2, create platform
- ask for the minimum filled required:
- name
- subdomain
- baseline?
- logo
- jobPostingConditions
- everything created after one step
- onSubmit
- mint platformId
- sign message
- post everything to DB
- Redirect to new domain
- Add Post job in the menu for everyone if jobPostingStrategy = allow others
- Display the conditons on the post page
- Display form or an access denied message depending on current wallet connected
- Add a form to update fees (but only accessible on superadmin for now)
- Clean old code
- Rename to platform?
71 changes: 71 additions & 0 deletions docs/users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Users

## Onboarding

We have 4 types of user on Builder Place.

| User Type | Description | Onboarding From |
| --- | --- | --- |
| Owner | A user that owned a platform | Default domain |
| Collaborator | A user added by a platform owner to help him administrate it | The platform custom domain |
| Worker | A user that is searching for work | Could be both |
| Hirer | A user that is want to post on a BuilderPlace | The platform custom domain |

### Owner onboarding

- From: BuilderPlace homepage
- Step 1: Complete the "create your profile" form
- It creates the user in DB
- And create a TLid linked to the address if the user don't have one yet
- Note: this step is automatically skipped if the user already have a TLid
- Step 2: Complete the "create your platform" form
- Create the platform in DB
- Create TLPlatformId owned by the address
- On success:
- Redirect to the new platform dashboard


### Collaborator onboarding

- From: BuilderPlace collaborators page
- Step 1: The owner complete the "add a collaborator" form
- It creates the user in DB (status pending as we didn't confirmed the signature)
- Send him an email with a link to the "create your profile" form
- And create a TLid linked to the address if the user don't have one yet
- Step 2: The owner delegate onchain right to the address TLID
- Step 3: The user click on the link and complete the "create your profile" form
- It update the user in DB (status confirmed)
- And create a TLid linked to the address if the user don't have one yet
- On success:
- Redirect to the platform dashboard


### Worker onboarding

- From:
- case 1: BuilderPlace worker page
- case 2: if a worker want to apply to a job
- Step 1: Complete the "create your profile" form
- It creates the user in DB
- And create a TLid linked to the address if the user don't have one yet
- Note: this step is automatically skipped if the user already have a TLid
- On success:
- Case 1: Redirect to his dashboard
- Case 2: Redirect to the job page


### Hirer onboarding

- From a given BuilderPlace, i the hirer want to post a job
- Step 1: Complete the "create your profile" form
- It creates the user in DB
- And create a TLid linked to the address if the user don't have one yet
- Note: this step is automatically skipped if the user already have a TLid
- On success: Redirect to the create job page

## TalentLayerId

- A TalentLayerId is a unique identifier that is linked to an address
- We will mint the TLid for the user automatically during onboarding.
- In case the user already have a TLid, we will link it to his profile in DB
- Important: In case something goes wrong, the user can create a TLid manually from the dashboard or anytime he try to execute his first onchain action
Loading