{"id":20189893,"url":"https://github.com/crossbell-box/newbie-villa","last_synced_at":"2026-06-05T02:31:06.975Z","repository":{"id":205029630,"uuid":"698434056","full_name":"Crossbell-Box/newbie-villa","owner":"Crossbell-Box","description":"Crossbell Newbie Villa Backend Service","archived":false,"fork":false,"pushed_at":"2024-01-09T04:23:08.000Z","size":1155,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-13T18:49:43.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://newbie.crossbell.io/docs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Crossbell-Box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-29T23:13:27.000Z","updated_at":"2024-05-04T14:33:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"a397e423-21d9-442b-8855-6a099d1a68c5","html_url":"https://github.com/Crossbell-Box/newbie-villa","commit_stats":null,"previous_names":["crossbell-box/newbie-villa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossbell-Box%2Fnewbie-villa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossbell-Box%2Fnewbie-villa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossbell-Box%2Fnewbie-villa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossbell-Box%2Fnewbie-villa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crossbell-Box","download_url":"https://codeload.github.com/Crossbell-Box/newbie-villa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241624877,"owners_count":19992960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T03:39:31.799Z","updated_at":"2026-06-05T02:31:06.966Z","avatar_url":"https://github.com/Crossbell-Box.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crossbell Newbie Villa Backend Service\n\nNewbie 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.\n\n## Features\n\n- Seamless Web3 migration with familiar email authentication.\n- Automatic Character assignment for new registrations.\n- On-chain social interactions recorded, with server covering initial gas fees.\n- Progress to a genuine Web3 social user by claiming your Character with a wallet address.\n\n## Getting Started\n\n#### Install deps:\n\n```bash\nnpm install\n```\n\n#### Prepare environment variables:\n\n```bash\ncopy .env.example .env\n```\n\n#### Setup wallet:\n\nYou 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`.\n\n#### Setup mailer:\n\nFollow [this article](https://medium.com/@nickroach_50526/sending-emails-with-node-js-using-smtp-gmail-and-oauth2-316fe9c790a1) to obtain the needed environment variables: `MAILER_GMAIL_CLIENT_ID`, `MAILER_GMAIL_CLIENT_SECRET`, `MAILER_GMAIL_REFRESH_TOKEN` and `MAILER_USER`.\n\n#### Start Database instance:\n\n```bash\nnpm run docker:db\n```\n\n#### Migrate database and generate types in development environment:\n\n```bash\nnpm run prisma:migrate:dev\n```\n\n#### Start server:\n\n```bash\nnpm run start:dev\n```\n\n#### Access the Swagger API docs:\n\nOnce 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](http://localhost:3987/docs).\n\n## Deployment\n\nDocker:\n\n```bash\n# building new NestJS docker image\ndocker-compose build\n# or\nnpm run docker:build\n\n# start docker-compose\ndocker-compose up -d\n# or\nnpm run docker\n```\n\nIn Node.js Environment:\n\n```\nnpm install\nnpm run build\nNODE_ENV=production node dist/main\n```\n\n### Migrate database\n\nIn development:\n\n```bash\nnpm run prisma:migrate:dev\n```\n\nIn production:\n\n```bash\nnpm run prisma:migrate:deploy\n```\n\n## Customizing Endpoints in [Crossbell React Kits](https://crossbell-dev.vercel.app)\n\nCheck out the customizing guide [here](https://crossbell-dev.vercel.app/docs/customizing-endpoints).\n\n## Modules\n\n### [NewbieJWT](src/module/newbie/newbie-jwt/)\n\nNewbieJWT Module handles the account related features like login, register, reset password, delete account, etc.\n\n### [NewbieTransaction](src/module/newbie/transaction/)\n\nNewbieTransaction Module handles the transactions like posting, commenting, liking, tipping, etc.\n\n### [Mailer](src/module/mailer/)\n\nMailer Module handles the email related features like sending verification email, sending reset password email, etc.\n\n### [CsbManager](src/module/csb-manager/)\n\nCsbManager Module provides some helper functions for interacting with the $CSB.\n\n### [Contract](src/module/contract/)\n\nContract Module used to initialize the contract instance.\n\n## Contribute\n\nFeel free to contribute to the Newbie Villa service to help lower the barrier between Web2 and Web3!\n\n\u003e 🫡 This project was initially developed by [@SongKeys](https://github.com/Songkeys). Original commit logs were deleted to protect sensitive information before open-sourcing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossbell-box%2Fnewbie-villa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrossbell-box%2Fnewbie-villa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossbell-box%2Fnewbie-villa/lists"}