Double login (Google, X/Twitter) + manage collected data using the admin panel.
- JavaScript(Vue3) self-hosted script
vue.esm-browser.prod.jsused to improve UI/UX experience.
- TypeScript(Deno) based web application.
- Deno(runtime) + Hono(framework) + Eta(template render engine) based.
- OAuth2(Open Authorization) implemented for Google and X/Twitter accounts, using deno_vk_oauth.
- common user can edit personal data record.
- admin panel used to manage data records collected from users.
- built-in Deno KV used to manage database stuff.
- deno deploy hosted.
admin accessgranted using deno deployenvironment variablesin production, and.envfile in development process.
The.envfile example:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
GOOGLE_OAUTH_CONFIG_REDIRECT_URI=http://localhost:8000/callback-google
X_OAUTH_CONFIG_REDIRECT_URI=http://localhost:8000/callback-x
ADMIN_IDS=idfromappscreen,anotheradmin,commaseparated
CSRF_ORIGIN=http://localhost:8000- for deno deploy, the
CSRF_ORIGINand the*_CONFIG_REDIRECT_URIprefixhttp://localhost:8000should be replaced to used domain. - to get
*_CLENT_IDand*_CLIENT_SECRETfirst configureOAuth2forGoogleandX/Twitteraccounts where you registered. - at the moment (2024) the solutions used have free plans.
ADMIN_IDSdisplayed in profile after login, and provided byOAuth2 API. So, first login without admin rights, then get id, finally add id into.envor deploy environment variable.
- configured Deno.
- correct
.envfile(otherwise OAuth2 will fail).
Developed on linux.
- clone the repo
- create and fill
.envfile in repo root folder(README.md file level). - terminal:
deno task bangto run locally.
For details discover the deno.json file.