{"id":15173346,"url":"https://github.com/pkunv/thoughtsy","last_synced_at":"2026-02-03T02:03:07.257Z","repository":{"id":208195435,"uuid":"720370555","full_name":"pkunv/Thoughtsy","owner":"pkunv","description":"React.js social web app with the main goal of allowing users to share their best words of wisdom.","archived":false,"fork":false,"pushed_at":"2023-12-13T19:17:27.000Z","size":534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T09:16:48.843Z","etag":null,"topics":["material-ui","material-ui-react","react-hook-form","react-router","react-router-dom","reactjs","supabase-js","typescript","typescript-react","vitejs","vitest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pkunv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-18T09:19:19.000Z","updated_at":"2023-12-02T13:49:28.000Z","dependencies_parsed_at":"2024-11-08T04:42:40.073Z","dependency_job_id":"59313086-0a40-48cd-9af7-5532769d6296","html_url":"https://github.com/pkunv/Thoughtsy","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"f3ba90bdb06811c06d7e4765703a5a509402c275"},"previous_names":["pkunv/thoughtsy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkunv%2FThoughtsy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkunv%2FThoughtsy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkunv%2FThoughtsy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkunv%2FThoughtsy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkunv","download_url":"https://codeload.github.com/pkunv/Thoughtsy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239808534,"owners_count":19700454,"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":["material-ui","material-ui-react","react-hook-form","react-router","react-router-dom","reactjs","supabase-js","typescript","typescript-react","vitejs","vitest"],"created_at":"2024-09-27T11:00:37.061Z","updated_at":"2026-02-03T02:03:07.144Z","avatar_url":"https://github.com/pkunv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thoughtsy\r\n\r\nSimple CRUD SPA social media web app that allows users to share their words of wisdom with others.\\\r\nCreated with React 18, React Router 6.4, React Hook Form 7.4 and Material UI 5.\\\r\nTesting environment includes Vitest + React Testing Library.\\\r\nUsed libraries and dependencies are React 18.2, React Router 6.4, React Hook Form 7.4 and Material UI 5.\\\r\nSupabase was used as back-end (_using not a local environment though! that's something to consider in the future for development purposes_)\r\n\r\n## Available functionality\r\n\r\n1. Handling user log in, log out and post fetching\r\n2. Registration with email verification\r\n\r\n## Instalation and configuration\r\n\r\n1. Create your [Supabase account](https://supabase.com/dashboard/sign-up) and create a new project.\r\n2. Go to SQL Editor and set up tables as follows:\r\n\r\n```sql\r\ncreate table\r\n  public.users (\r\n    uid uuid not null,\r\n    \"displayName\" character varying null,\r\n    \"createdAt\" timestamp without time zone null default (now() at time zone 'utc'::text),\r\n    constraint users_pkey primary key (uid)\r\n  ) tablespace pg_default;\r\ncreate table\r\n  public.posts (\r\n    id bigint generated by default as identity,\r\n    content character varying null,\r\n    type character varying null,\r\n    source character varying null,\r\n    uid uuid null,\r\n    \"createdAt\" timestamp with time zone not null default now(),\r\n    active boolean null default true,\r\n    constraint thoughts_pkey primary key (id),\r\n    constraint posts_id_key unique (id),\r\n    constraint posts_uid_fkey foreign key (uid) references users (uid)\r\n  ) tablespace pg_default;\r\ncreate table\r\n  public.users (\r\n    uid uuid not null,\r\n    \"displayName\" character varying null,\r\n    \"createdAt\" timestamp without time zone null default (now() at time zone 'utc'::text),\r\n    constraint users_pkey primary key (uid)\r\n  ) tablespace pg_default;\r\n```\r\n\r\n3. In your project, go to SQL Editor once again and paste these policies and triggers for table interactions:\r\n\r\n```sql\r\ncreate policy \"Profiles are viewable by everyone.\"\r\n  on users for select\r\n  using ( true );\r\n\r\ncreate policy \"Users can insert their own profile.\"\r\n  on users for insert\r\n  with check ( auth.uid() = id );\r\n\r\ncreate policy \"Users can update own profile.\"\r\n  on users for update\r\n  using ( auth.uid() = id );\r\n\r\ncreate policy \"Posts are viewable by everyone.\"\r\n  on posts for select\r\n  using ( true );\r\n\r\ncreate policy \"Post likes are viewable by everyone.\"\r\n  on postLikes for select\r\n  using ( true );\r\n\r\ncreate policy \"Users can update only their own posts.\"\r\n  on posts for update\r\n  using ( auth.uid() = uid );\r\n```\r\n\r\n```sql\r\ncreate or replace function public.handle_new_user()\r\nreturns trigger as $$\r\nbegin\r\n  insert into public.users (uid)\r\n  values (new.id);\r\n  return new;\r\nend;\r\n$$ language plpgsql security definer;\r\ncreate or replace trigger on_auth_user_created\r\n  after insert on auth.users\r\n  for each row execute procedure public.handle_new_user();\r\n```\r\n\r\n4. Create a test user for tests assertion (Authentication section in Supabase)\r\n5. Fork repo\r\n6. Execute `npm i` to install dependencies\r\n7. Copy Supabase API keys which you can find in Settings section and API tab, then create `.env` file with these variables:\r\n\r\n```\r\nVITE_SUPABASE_KEY=supabase_key_here\r\nVITE_SUPABASE_SITE=supabase_site_here\r\nVITE_SUPABASE_TEST_EMAIL=test@user.com\r\nVITE_SUPABASE_TEST_PASSWORD=123456\r\nVITE_TEST_SIGN_UP=0\r\nVITE_SUPABASE_SIGNUP_EMAIL=actual@email.com\r\nVITE_SUPABASE_SIGNUP_DISPLAY_NAME=signUpTestUser\r\nVITE_SUPABASE_SIGNUP_PASSWORD=123456\r\n```\r\n\r\n8. Execute `npm run test` to start tests to check all functionality.\r\n\r\n\u003e Please note that while testing sign up Supabase sends a standard verification e-mail.\r\n\u003e You should turn that off in Authentication section -\u003e Providers -\u003e Email -\u003e Confirm email\r\n\r\n\u003e To disable or enable sign up integration test you can change `VITE_TEST_SIGN_UP` to _0_ or _1_\r\n\r\n## Useful documentations\r\n\r\n### [React Router Docs](https://reactrouter.com/en/main/start/tutorial)\r\n\r\n### [Material UI](https://mui.com/material-ui/getting-started/learn/)\r\n\r\n### [React Hook Form](https://react-hook-form.com/get-started#Quickstart)\r\n\r\n### [React Testing Library](https://testing-library.com/docs/queries/about)\r\n\r\n### [React Testing Guide - Aria roles cheatsheet](https://components.guide/react+typescript/testing)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkunv%2Fthoughtsy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkunv%2Fthoughtsy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkunv%2Fthoughtsy/lists"}