Seedling is the beginning of your next project. It builds on RedwoodJS with some conventions that will save you time at the cost of choice. However, if you're prototyping you may not want to choose how auth, email, and automation are built in and would rather just write the code that adds value.
This is dependent on the following technologies.
Convention over configuration
We want a clear way to solve most problems, if it can be solved it should be done in a repeatable way.
Authentication providers
Today we support dbAuth, and Auth0. Just change your environment variables to switch.
Beautiful Responsive Emails
No one likes the minefield that is email. MJML helps build your templates and make them beautiful on every client.
Privacy is important to us
We've taken steps to ensure that your users' privacy is respected.
Security Roles
Table and field level roles by default are set so you can simply give them out and not figure them out.
Row Level Security
Row Level Security is hard, we a convention for how to do this that makes sense.
Automate with rules
Rules are api side logic that run before and after create, read, update and delete operations.
Accessibility
We use Chakra-UI to make these sites as accessible as possible.
Forms and Lists
When generating pages and components from models, we build out sortable, searchable, filterable lists, and common forms.
Own your data
When you own it, you can do whatever you want with it. That's a tool hard to replace when you give away your keys.
- Authentication Targets
- dbAuth
- Auth0
- Clerk
- Azure Active Directory
- Magic.Link
- Supabase
- Security
- Table level security
- Field level security
- Row level security
- Roles controlled on your database applied from the group to the user
- Field level security
- Field data on Read can be hidden (by modifying returned data)
- Field data on ReadAll can be hidden (by modifying returned data)
- Field data on Create OR Update can be rejected (by changing status from 'success')
- Field data on Create OR Update can be removed (by deleting incoming data)
- Secure by default
- We've included roles when you generate new models to control who can Create, Read, Update, and Delete
- Protective steps to mitigate XSS, and Clickjacking have been taken
- Email Providers
- Mailgun
- Mailchimp
- Mailjet
- Nodemailer
- Sendinblue
- Sendgrid
- Amazon SES
- Privacy
- No third-party data gets your data
- Users' emails/usernames masked by directives
- By default, users' can delete their accounts
You have a few options here.
- You can play around on the demo site, https://seedling.tskr.io with logins and passwords matching for admin, manager, and employee.
- Goto [seedling.tskr.io] and click
Deploy to Netlify
to build your repo with proper environment variables. - Use this template to get started. This will generate a Gitpod build to get you up and running. You will still need a postgres connection URL for your database.
-
Fork the Repository.
-
Clone your fork
git clone https://github.com/tskrio/seedling.git seedling
-
Go to the project directory
cd seedling
-
Install dependencies
yarn i
-
Configure a PostgresDB
This is a bit more involved but you'll need a database somewhere either on your machine or hosted somewhere. I generally set up a https://railway.app postgressql database
- Provision a PostgreSQL project.
- Click on PostgreSQL, then Connect.
- Copy the Postgres Connection URL
-
Configure Environment Variables
Modify the ./.env file to have a
DATABASE_URL
andSESSION_SECRET
. Paste in your connection string and add the following to the end.?connection_limit=1
It should look like so.
DATABASE_URL=postgres://<user>:<pass>@<url>/<db>?connection_limit=1 SESSION_SECRET=replaceme
-
Push SQL to your database
yarn rw prisma migrate dev
-
Generate a new secret
yarn rw g secret
Update your
./.env
file's SESSION_SECRET -
Start the server
yarn rw dev
-
Seed the database
#not yet written
Alt. intstructions
- Start your server
yarn rw dev
- Open the browser and go to http://localhost:8910/
- Signup
- Open Prisma Studio
yarn rw prisma studio
- Identify your user's ID
- Create a Group (note the ID)
- Create a GroupMember with user's ID and group's ID
- Create a GroupRole with group's ID, and role of
admin
From here on out, you can create groups, and users in the browser, but the initial user and rights needed to be set up. There's an issue with seeding on windows which is why these instructrions are ... long.
- Start your server
-
Fork the Repository.
-
Goto your fork.
-
Configure a PostgresDB
This is a bit more involved but you'll need a database somewhere either on your machine or hosted somewhere. I generally set up a https://railway.app postgressql database
- Provision a PostgreSQL project.
- Click on PostgreSQL, then Connect.
- Copy the Postgres Connection URL
-
Set up your environment variables in gitpod.
Name Scope Value DATABASE_URL yourName/seedling Connection String from above SESSION_SECRET yourName/seedling Well set this later -
When the terminal comes do the following.
-
Push your schema to your database via
yarn rw prisma migrate dev
. -
Generate a new secret via
yarn rw g secret
. -
Copy that string and set it in the varables for gitpod.
-
Stop your workspace via the menu. Then relaunch it.
Right now, sometimes when setting this up for the first time, permissions aren't always added. I have an issue to make this better, but until then here's how to get around it.
- Goto prisma's studio by running this on your command line;
yarn rw prisma studio
- Verify you have a user you created or admin is there. If missing, spin up
yarn rw dev
and Sign up and try again. - Still stuck? Verify there's group roles associated to the user and group in question. If missing, create a group in prisma studio, and a group role of admin.