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.
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 mailgun dashboard to obtain the needed environment variables: MAILGUN_API_KEY and MAILER_USER.
e.g.
MAILGUN_API_KEY=1234567890abcdef1234567890abcdef
[email protected]
Then run the test to check if the mailer is working:
docker run -d -p 6379:6379 redis:alpine # start a redis instance
MAILGUN_API_KEY=1234567890abcdef1234567890abcdef [email protected] [email protected] node -r ts-node/register test/test-mailer.ts
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
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.
Content type
Image
Digest
sha256:cb46589e8…
Size
584.2 MB
Last updated
about 1 year ago
docker pull flosspicks/newbie-villa