User
Write something
How I reconfigured the project to run everything with one command
Hello engineers, I was annoyed that I needed to run two separate commands to start the whole app. So, I did some research, asked an LLM, and found a great solution! :) Instead of running the Supabase backend via the CLI, I updated the main Docker Compose file to include all Supabase containers directly. Now, I can just run npm start in the root directory, and the entire project, frontend and backend. Everything starts at the same time. What I did: - Completely restructured the server directory (following this documentation and this repository) - Ensured all volumes for the backend containers are stored in the server directory. Services I added: - studio - kong - auth - rest - realtime - storage - imgproxy - meta - functions - analytics - db - supavisor Volumes I added: - db-config - deno-cache Now I can run the entire stack with just one command! :) Gitlab commit link @Pretbc Pretbc Do you want to do a code review?
2
0
How I connected Supabase auth.users to my own public.users table
Hello engineers, For the past few days I’ve been trying to set up Supabase as my backend‑as‑a‑service. It turns out it’s a bit more complicated than I expected (surprise :)). The goal is to set up a solid foundation for future development. I want to create tables for users and tenants. Supabase already has a table for users — auth.users. That table is for authentication: when a user registers in the app, a record is created there. But if I want to connect that user to other tables, I need to access the user’s id from the auth.users table, and it looks straightforward: just use auth.users(id). For example, if I want to create a table public.users (for storing additional data for each user), I can do this: CREATE TABLE IF NOT EXISTS public.users ( id UUID PRIMARY KEY REFERENCES auth.users (id) ON DELETE CASCADE, -- additional data for a user full_name TEXT, avatar_url TEXT, created_at TIMESTAMPTZ DEFAULT NOW(), updated_at TIMESTAMPTZ DEFAULT NOW(), tenant_id UUID REFERENCES public.tenants (id) ON DELETE CASCADE ); Now the user is fully linked to the app logic, while still being backed by Supabase Auth.
2
0
1-2 of 2
powered by
EngineeringTech
skool.com/szykulatech-3240
We focus on JS/TS, React, Next.js, Supabase, shadcn/ui, Tailwind CSS, and deployments on Netlify. We focus on fast learning.
Build your own community
Bring people together around your passion and get paid.
Powered by