cinetic
Cinematic launch films and motion design from code, directed by your coding agent.
Resize and compress JPEG, PNG and WebP images in your browser. Save the results to a private library.
DesignTypeScript · PLpgSQLGitHub @kondwanimuwowoOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A Next.js app that resizes and compresses large images in the browser, with an optional Supabase library for saving results. Built to deploy on Vercel.
src/lib/compress.ts). Originals are never uploaded.POST /api/uploads, which records the image in the compressions table and returns a signed upload URL. The browser then uploads straight to Supabase Storage, so files never pass through a Vercel function and its 4.5 MB request limit does not apply./library lists saved images through GET /api/library, which returns signed download links that expire after one hour.localStorage. Signed-in people (email and password through Supabase Auth) see the images saved to their account on any device./admin is for accounts with the admin role. It has four tabs:
Access is checked in three places: the middleware sends signed-out visitors to /login, the admin layout checks the role on the server, and every server action checks it again. Admins can not demote, suspend or delete their own account, so there is always at least one admin left.
Create an account at /login, then run this in the Supabase SQL editor:
update public.profiles set role = 'admin' where email = '[email protected]';
After that, promote other people from the Users tab.
When a retention period is set, Vercel Cron calls /api/cron/purge once a day (see vercel.json) and deletes older images. Set CRON_SECRET in Vercel for this to run.
npm install
cp .env.example .env.local # fill in values, or leave empty to run without the library
npm run dev
Without Supabase keys the compressor and downloads still work. The Save button is hidden and the library page explains how to turn it on.
supabase/migrations/ in order in the SQL editor, or supabase db push with the CLI. They create the compressions, profiles and app_settings tables (RLS on everywhere), a private compressed-images storage bucket, a trigger that creates a profile for each new user, and the admin_stats function used by the dashboard..env.local.The service role key is only read on the server (src/lib/supabase-server.ts). The anon key is used in the browser only to upload with a signed URL issued by the server.
NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY and CRON_SECRET under Settings > Environment Variables.The illustrations in public/illustrations are custom SVGs drawn for this project. Swap them for your own photography by replacing the files or the paths in src/app/page.tsx.