Getting Started
Astro Starter ๐
Get your Astro app up and running by following the steps below.
Prerequisites
Before you get started, you will need to have the following installed on your machine.
- Node.js (v20 or higher)
- Git
- pnpm
- A code editor (VSCode, VSCodium, WebStorm, etc.)
Set up a new database
This starter kit uses Drizzle as the database ORM. It is currently configured to use PostgreSQL, but you can manually modify it to use MySQL or SQLite instead. For PostgreSQL, we recommend Neon and Zeabur.
Create a new PostgreSQL database and have the connection string ready. The connection string should look something like this:
Initialize a new project
Next, go to your terminal. Then, clone the Github repository.
Navigate into the project directory.
Switch to the branch based on the authentication library you want to use. For example, if you want to use Lucia, switch to the main
branch. For Logto, switch to the logto
branch.
Use Lucia if you are undecided.
Next, install the dependencies.
Now, re-initialize Git for your project.
Create a .env
file in the root of the project by copying the .env.example
file.
Migrate the database
Open the .env
file in your code editor and update the DATABASE_URL
environment variable with your database connection string from above.
Migrate your database.
Now if you check your database, you should see the user
, session
, and subscription
tables.
If youโre using Lucia, you should also see the email_verification_request
and password_reset_session
tables.
Start the development server
Run the following command in your terminal to start the development server.
Open http://localhost:4321 in your browser to see your app.
๐ Congratulations, your app is now up and running! Proceed to the next page to continue with setup.