{"id":18878584,"url":"https://github.com/verida/verida-one-webapp","last_synced_at":"2025-07-22T15:03:02.825Z","repository":{"id":79107947,"uuid":"570419340","full_name":"verida/verida-one-webapp","owner":"verida","description":"Verida One is a public, decentralized platform that allows you to showcase who you are across Web2 and Web3, online and IRL","archived":false,"fork":false,"pushed_at":"2024-04-15T07:12:32.000Z","size":43924,"stargazers_count":3,"open_issues_count":35,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-15T15:56:37.831Z","etag":null,"topics":["decentralized","identity","nft","personal-data","profile","sbt","web3"],"latest_commit_sha":null,"homepage":"https://www.verida.one","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verida.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}},"created_at":"2022-11-25T06:24:37.000Z","updated_at":"2024-04-17T02:55:09.095Z","dependencies_parsed_at":null,"dependency_job_id":"ba433041-2eb3-4a5e-82c0-55a537b386a6","html_url":"https://github.com/verida/verida-one-webapp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fverida-one-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fverida-one-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fverida-one-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fverida-one-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verida","download_url":"https://codeload.github.com/verida/verida-one-webapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248936878,"owners_count":21186118,"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":["decentralized","identity","nft","personal-data","profile","sbt","web3"],"created_at":"2024-11-08T06:28:11.466Z","updated_at":"2025-04-14T18:32:16.561Z","avatar_url":"https://github.com/verida.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Verida One Webapp\n\n## Overview\n\nYour identity in one place\n\n## Development\n\nThe application is composed of a frontend and a server. The server merely allows the update of the meta tags dynamically before serving the index.html.\n\nOn a local development environment, due to current limitations, the server only serves the build folder of the frontend, so doesn't allow hot reloading of the frontend.\n\nWe recommend to focus on either the frontend or the server at a time.\n\n### Install\n\n```\n// frontend\nyarn install\n\n// server\ncd ./server\nyarn install\n```\n\nSome environment variables are required for the application to run. Have a look at the provided examples.\n\nCopy `.env.example`, rename it to `.env` and modify the variables for your local environment.\n\n```\n// frontend\ncp .env.example .env\n\n//server\ncd ./server\ncp .env.example .env\n```\n\n### Run\n\nThe frontend can be started with its dedicated development server supporting hot reloading:\n\n```\n// frontend\nyarn run start:dev\n```\n\nThe server can be started via the following command (serving the build folder of the frontend):\n\n```\n// server\ncd ./server\nyarn run start:dev\n```\n\n### Features in development\n\nNon production-ready features must be disabled in Production deployment. To ensure this, add a feature flag in `/lib/config`. It can be simply based on the existing `process.env.REACT_APP_ENABLE_DEV_FEATURES=true` or it can have a dedicated environment variable.\n\nCheck for `.env.example` for the exact variables.\n\n### Mock data\n\nIn a similar way as the development features, a set of mock data is available. It can be enabled by setting the environment variable `REACT_APP_ENABLE_MOCK_DATA=true`.\n\nThe mock profile can found by searching for the Username \"ryan-demo.vda\".\n\n### Linting and Formatting\n\nWe use eslint for the linting and prettier for the formatting.\n\nScripts are available to check and fix issues.\n\n```\n// frontend\nyarn run check\n```\n\n```\n// frontend\nyarn run fix\n```\n\n### i18n\n\nThis project uses `react-intl` to manage the internationalisation. No user-facing messages should be hardcoded, there is a eslint rule throwing an error in such case.\n\nMessages are all listed in a dedicated json file in the `messages` folder at the root of the project. Supporting multiple languages is about providing translations in the appropriate json files.\n\nWhen running `yarn run start` or `yarn run build` the messages are automatically compiled under `src/lib/lang`. The compiled messages are the one used by the app\n\n#### Usage\n\nUse the hook `useIntl` which provides a set of functions such as `formatMessage`.\n\nFor messages, the `id` must be unique and following the naming convention `\u003cComponentName\u003e.\u003cvariableName\u003e`. The default message should always be set as it can be used as a fallback. It's also a good practice to give a description right away.\n\n```jsx\nconst SubmitButton = () =\u003e {\n  const i18n = useIntl();\n\n  const buttonLabel = i18n.formatMessage({\n    id: \"SubmitButton.buttonLabel\",\n    description: \"Label of the Submit button\",\n    defaultMessage: \"Submit\",\n  });\n\n  return \u003cbutton\u003e{buttonLabel}\u003c/button\u003e;\n};\n```\n\nThe message definition should always be copied into the json files in the messages folder (`messages/en.json`).\n\n```json\n{\n  \"SubmitButton.buttonLabel\": {\n    \"description\": \"Label of the Submit button\",\n    \"defaultMessage\": \"Submit\"\n  }\n}\n```\n\nYou can run a dedicated script to extract all messages into the json file.\n\n```\n// frontend\nyarn run messages:extract\n```\n\nSee more information on the [react-intl documentation](https://formatjs.io/docs/getting-started/message-declaration).\n\n### Test\n\n```\n// frontend\nyarn run test\n```\n\n### Build\n\n```\n// frontend\nyarn run build\n```\n\nMessages are compiled automatically before the build.\n\nNote: The server part is currently written in javascript and doesn't require any build phase.\n\n## Deployment\n\nBefore building and deploying, set the environment variables according to your platform. See the required variables in `.env.example`.\nThe variables `NODE_ENV` must be set to the value `production` for an optimised bundle. This is usually done by default on most platform.\n\nThe build command fo the frontend generates a build folder with the bundled static files of the frontend.\n\nFrom there, several deployment options are possible.\n\n- Static files on a CDN or equivalent\n- Server + local static files\n- A mix of the above: server + static files a CDN location.\n\n### Static files\n\nNote that this option prevents the meta tags from being dynamically updated before serving the page.\n\nThe build folder can be deployed to a CDN or equivalent (Netlify, Amplify, S3 web hosting, ..., heroku with the create-react-app buildpack fall in this options as well).\n\n### Server + local static files\n\nThis option allows dynamically setting the meta tags before serving the page.\n\nDeploy the repository, build the frontend then run the server so that it serves the static files straight from the build folder.\n\nThe server has two entry points under the folder `./server/src`:\n\n- `servers.js` for a server environment (EC2, Heroku with no particular buildpack, ...)\n- `handler.js` for a serverless environment (Lambda, ...), a `serverless.yml` is provided in the repository (although, in its current state it doesn't bundle the frontend build folder)\n\nNote that a serverless deployment is not recommended with this option because all the static files will be requested through it, without the delivery optimisation that a CDN could provide. Check the next option.\n\n### Server + external static files\n\nThis option allows dynamically setting the meta tags before serving the page.\n\nFor this method to work, all the resources must be referenced with an absolute path, for instance `https://cdn.verida.one/favicon.png` instead of just `/favicon.png`. The environment variable `PUBLIC_URL` is use to that effect. CRA/Webpack prepends the variable to the path to the resources when building the frontend, so ensure to set this environment variable with the location where you will deploy the static files before building the frontend. After building, you can deploy on a CDN such as S3 + CloudFront.\n\nThe server, is deployed in a similar way as the previous option. The difference being it must be aware of the location of the resources. The environment variable `RESOURCES_URL` is used to determine if it should fetch the `index.html` locally or from the specified location. So do not forget to set the variable before running the server, for instance `RESOURCES_URL=https://cdn.verida.one`\n\nOnce again, the server has two entry points:\n\n- `servers.js` for a server environment (EC2, Heroku with no particular buildpack, ...)\n- `handler.js` for a serverless environment (Lambda, ...), a `serverless.yml` is provided in the repository\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverida%2Fverida-one-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverida%2Fverida-one-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverida%2Fverida-one-webapp/lists"}