Newbie Villa facilitates a smooth transition from Web2 to Web3 on Crossbell. Users can start by registering with their email, automatically receiving a Character for on-chain social interactions. As users delve deeper, they can claim their Characters via a wallet address, unlocking the broader Web3 social realm on Crossbell.
- Seamless Web3 migration with familiar email authentication.
- Automatic Character assignment for new registrations.
- On-chain social interactions recorded, with server covering initial gas fees.
- Progress to a genuine Web3 social user by claiming your Character with a wallet address.
npm install
copy .env.example .env
You will need to create a wallet and obtain the private key and address, then fill in the environment variables: NEWBIE_VILLA_WALLET_ADDRESS
and NEWBIE_VILLA_WALLET_PRIVATE_KEY
.
Follow this article to obtain the needed environment variables: MAILER_GMAIL_CLIENT_ID
, MAILER_GMAIL_CLIENT_SECRET
, MAILER_GMAIL_REFRESH_TOKEN
and MAILER_USER
.
npm run docker:db
npm run prisma:migrate:dev
npm run start:dev
Once the server starts, the Swagger API docs will be available at the /docs
path. For example, if you are running the server locally at port 3987
, you can access the docs at http://localhost:3987/docs.
Docker:
# building new NestJS docker image
docker-compose build
# or
npm run docker:build
# start docker-compose
docker-compose up -d
# or
npm run docker
In Node.js Environment:
npm install
npm run build
NODE_ENV=production node dist/main
In development:
npm run prisma:migrate:dev
In production:
npm run prisma:migrate:deploy
Customizing Endpoints in Crossbell React Kits
Check out the customizing guide here.
NewbieJWT Module handles the account related features like login, register, reset password, delete account, etc.
NewbieTransaction Module handles the transactions like posting, commenting, liking, tipping, etc.
Mailer Module handles the email related features like sending verification email, sending reset password email, etc.
CsbManager Module provides some helper functions for interacting with the $CSB.
Contract Module used to initialize the contract instance.
Feel free to contribute to the Newbie Villa service to help lower the barrier between Web2 and Web3!
🫡 This project was initially developed by @SongKeys. Original commit logs were deleted to protect sensitive information before open-sourcing.