Getting Started
This guide will get you up and running with FastSvelte in under 10 minutes. By the end, you'll have a fully functional SaaS application running locally with authentication, user management, and payment processing.
Prerequisites
Before you begin, make sure you have the following installed:
- uv - Fast Python package and project manager (installation guide)
- Node.js 22+ - For the SvelteKit frontend
- Sqitch - For database migrations (installation guide)
- Docker - For running PostgreSQL and containerized setup
For Integrations (Install When Needed)
- Stripe CLI - Required for payment webhooks (Stripe integration guide)
- Google OAuth - Required for social login (OAuth integration guide)
Optional but Recommended
- pgAdmin or similar PostgreSQL client for database management
- REST Client VS Code extension (Recommended), Insomnia, or Postman for testing endpoints
Quick Setup (3 Steps)
1. Clone the Repository
# Clone the repository (choose SSH or HTTPS)
# Option 1: SSH (recommended if you have SSH keys configured)
git clone git@github.com:harunzafer/fastsvelte.git my-project
# Option 2: HTTPS (requires Personal Access Token)
git clone https://github.com/harunzafer/fastsvelte.git my-project
cd my-project
# Remove the original remote (prevents accidental pushes to FastSvelte repo)
git remote remove origin
Note
GitHub no longer supports password authentication. If you don't have SSH keys set up, you'll need to use a Personal Access Token instead of your password.
2. Run Interactive Setup
# Run the interactive setup script
uv run init.py
# Or preview changes without executing (dry-run mode)
uv run init.py --dry-run
The script will:
- Check that all prerequisites are installed
- Ask you for configuration (app name, mode, database settings, etc.)
- Generate all
.envfiles with your configuration - Update database schema names
- Set up Docker PostgreSQL database
- Run database migrations (includes seed data)
- Set up backend (Python virtual environment + dependencies)
- Set up frontend (npm install + API client generation)
- Set up landing page (npm install)
This takes about 3-5 minutes depending on your internet speed.
Tip
Use --dry-run to preview what the script will do without making any changes.
Cleanup After Setup
Once your setup is complete and working, you can safely delete init.py - it's only needed for initial setup. The same applies to the /docs folder: either update it for your own project documentation or delete it entirely.
Review and Commit Changes
After init.py completes successfully, review what was changed:
# See all modified files
git status
# Review all changes
git diff
# Commit the customizations
git add .
git commit -m "Initial project setup and customization"
LLM Instructions
Update CLAUDE.md with your project description. Edit the Project Overview section to describe your application and replace the TODO placeholder with your app's purpose and features
3. Create Your First Admin User
Once the init script completes successfully, create a system administrator account:
The script will prompt you for:
- Email address - Defaults to
admin+dev@{yourapp}.comfor localhost databases - Password - Minimum 8 characters
- First name - Defaults to "System"
- Last name - Defaults to "Admin"
What happens:
- Creates a
sys_adminuser in the "System Administration" organization - The
sys_adminrole has application-wide permissions (not limited to one organization) - No email verification required
Email Aliases for Environments
We recommend different email aliases for each environment:
- Development (localhost):
admin+dev@yourapp.com - Beta/Staging:
admin+beta@yourapp.com - Production:
admin@yourapp.com
All emails go to the same inbox, but you can easily identify which environment they're from.
Troubleshooting:
- If you see "Organization 'System Administration' not found", run database migrations first
- If the user already exists, the script will notify you
Email Verification in Development
In development mode, the email service defaults to stub (no actual emails sent). When registering new users, look for [STUB EMAIL] blocks in the backend logs - they contain the verification link you can copy/paste to complete registration.
4. Start Your Application
After creating your admin user, start the services:
5. Access Your Application
- Frontend Dashboard: http://localhost:5173
- Backend API: http://localhost:8000
- Landing Page: http://localhost:5174
Navigate to http://localhost:5173/login and login with the admin credentials you created in Step 3.
Testing User Registration (B2C Mode Only)
If you're running in B2C mode, you can test the public registration flow:
- Access the signup page: Navigate to http://localhost:5173/signup
- Create a new account: Fill in email, password, first name, and last name
- Check backend logs for verification link: Since email service defaults to
stubin development, look for[STUB EMAIL]blocks in your backend terminal - Copy the verification link: Find the URL in the email verification message
- Verify your email: Paste the verification link in your browser to complete registration
- Log in: Use your new credentials at http://localhost:5173/login
B2B Mode Registration
In B2B mode, the /signup page returns 404. Users can only join via invitation from a system administrator or organization admin. See the B2B Mode Guide for details on the invitation workflow.
6. Explore the Application
After logging in, you can:
- User management - View and manage users
- Organization settings - Configure your organization
- System analytics - View usage statistics
- AI Note Improver - Test the demo application with note creation and AI-powered improvements
Explore the API
Visit http://localhost:8000/docs for interactive API documentation.
Environment Variables
The backend environment variables are in backend/.env using the FS_ prefix. These are loaded using Pydantic Settings. Here are the core variables you should be aware of:
FS_APP_NAME: Your application nameFS_MODE: b2c or b2b (see B2B Mode for details)FS_ENVIRONMENT: dev, beta, or prodFS_DB_URL/FS_DB_SCHEMA: Database connectionFS_BASE_WEB_URL/FS_BASE_API_URL: Frontend and backend URLsFS_JWT_SECRET_KEY: OAuth state validation (auto-generated)FS_CRON_SECRET: Cron job authentication (auto-generated)
Additional .env files exist in frontend/, landing/, and db/ directories for their respective configurations.
Automatic Configuration
The init.py script automatically generates all .env files with core variables. You typically only need to manually configure environment variables when adding integrations (email, payments, OAuth).
See the .env.example files in each directory for a full list of available environment variables.
See the Integrations Guide for instructions on configuring email services, payment gateways, and OAuth providers.
Next Steps
Now that you have FastSvelte running:
- Development Guide - Learn common development workflows
- Architecture Overview - Understand how FastSvelte is built
- Tutorials - Step-by-step guides for adding features
- Integrations - Configure email, payments, and OAuth
- Deployment - Deploy to production
- Troubleshooting - Common issues and solutions