Frequently Asked Questions (FAQ)¶
This FAQ section answers common questions related to setting up, using, and troubleshooting the Craft Your Startup Boilerplate. If you encounter any issues not covered here, feel free to open an issue on GitHub.
Table of Contents¶
- Setup Issues
- How do I set up the project locally?
- What are the required dependencies?
- Database Questions
- How do I connect to the database?
- How do I run database migrations?
- Deployment Questions
- How do I deploy the project to DigitalOcean?
- What environment variables do I need in production?
- Troubleshooting
- Why is my front-end not connecting to the back-end?
- How do I troubleshoot Docker-related issues?
Setup Issues¶
How do I set up the project locally?¶
To set up the project locally, follow these steps:
-
Clone the repository:
-
Install back-end dependencies with Poetry:
Bash -
Install front-end dependencies:
Navigate to the
frontenddirectory and install dependencies: -
Run the development servers:
For the back-end:
Bash For the front-end:
Bash
What are the required dependencies?¶
- Python 3.11+ (with Poetry for dependency management)
- Node.js and npm/yarn (for the front-end)
- PostgreSQL (as the database)
- Docker (for running the project with Docker Compose)
Database Questions¶
How do I connect to the database?¶
You can connect to the PostgreSQL database using the credentials defined in your .env file (or prod.env for production). For local development, ensure the PostgreSQL service is running via Docker:
| Bash | |
|---|---|
Use the following credentials in your database client (e.g., DBeaver, pgAdmin):
| Bash | |
|---|---|
How do I run database migrations?¶
To run migrations, use Alembic. For local migrations, run:
| Bash | |
|---|---|
For production, you can run migrations from your local machine with prod.env:
| Bash | |
|---|---|
Deployment Questions¶
How do I deploy the project to DigitalOcean?¶
The project can be deployed to DigitalOcean App Platform by following these steps:
- Create a new app on DigitalOcean App Platform, and link your GitHub repository.
- Configure environment variables to match your
prod.envfile. - Deploy the appโDigitalOcean will automatically detect and build the project using the Dockerfile.
What environment variables do I need in production?¶
For production, your environment variables (stored in DigitalOcean App Platform or your production .env file) should look something like this:
| Bash | |
|---|---|
| |
Troubleshooting¶
Why is my front-end not connecting to the back-end?¶
There could be several reasons for this issue:
- Proxy Setup: Ensure that the Vite proxy in
vite.config.tsis properly configured to forward/apirequests to the back-end. - Environment Variables: Ensure the API base URL is correctly set in the environment variables (for local development, check
VITE_API_BASE_URL). - CORS Issues: Check if your FastAPI back-end allows CORS for the front-end domain.
How do I troubleshoot Docker-related issues?¶
If you're experiencing issues with Docker, here are a few common solutions:
- Check if Docker is running: Make sure Docker is installed and running on your machine.
- Check container logs: Use
docker-compose logs -fto see the logs for your containers and debug any issues. -
Rebuild the containers: If you made changes to the Dockerfile or environment, rebuild the containers using:
For additional help or to report bugs, feel free to open an issue on GitHub.