1. Fork the repository
Go to our repository and click “Fork”
2. Clone your copy of Plazen
git clone https://github.com/<your_username>/plazen.git
3. Copy example .env
4. Create a Supabase project
Go to Supabase official website and create a project
5. Get Supabase environmental values.
These are required for Supabase Auth and cookies, they are not used for database connection
In Settings > API keys you can get:
NEXT_PUBLIC_SUPABASE_ANON_KEY="first_line"
SUPABASE_SERVICE_ROLE_KEY="second_line"
6. Get Prisma running
This project requires you to have Supabase as a database too currently
a. In Supabase dashboard click the “Connect” button in the top left corner:
b. The Supabase will give you a direct connection string that looks like this:
postgresql://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-ID].supabase.co:5432/postgres
c. Copy it (you will need the password from step 4) and paste it in the .env
Notice how the URL is different from the example above? It is because you have to use a pooler for the production build (Most servers don’t support IPv6). If running locally, you will be fine with either
d. Now, that supabase is almost set up, you need to push our schema to the new database
npm install
npx prisma generate
npx prisma db push
This should be enough to get the project running!
Other environmental variables are used for specific features.