Skip to content

Developing locally verses in the cloud with Pythagora

Weston Ludeke edited this page Jan 28, 2025 · 17 revisions

When you start using Pythagora, you'll be prompted to choose between developing your application locally or in the cloud. This guide explains both options, their workflows, and how to manage your development environment.


Local Development

Local development means building and running your application directly on your computer. Here’s what to expect:

  • Traditional Approach: Local development has been Pythagora’s default method until recently.
  • Dependencies: You'll need to install MongoDB, Python, Node.js, and other dependencies on your machine.
  • File Storage: All Pythagora core files and your application will be stored locally in a directory you specify.
    • To set this up, go to Pythagora's Settings page. Under GPT Pilot path, click Change and select a new, empty directory. This will house all of Pythagora's Core files and your projects.

Cloud Development

Cloud development allows Pythagora to handle everything for you in a managed environment:

  • Hassle-Free Setup: Only the Pythagora VS Code extension is required. No need to install MongoDB, Python, or Node.js locally.
  • Cloud-Managed: All packages, dependencies, and your application are built and managed by Pythagora in the cloud.
  • Convenience: Ideal for those who want a quick, streamlined setup without configuring local environments.

Accessing Application Files

Local Development

  • When developing locally, all files are stored in the directory specified under GPT Pilot path in the Pythagora settings.
  • File hierarchy:
    • The main folder: pythagora-core
    • Within pythagora-core, a subfolder called workspace contains your projects:

click to see this gif in a larger window

Cloud Development

  • When developing in the cloud, all files are managed by Pythagora’s cloud infrastructure.
  • To access them:
    1. With the Cloud running, open a terminal in VS Code and you will be connected to your Pythagora instance.
    2. Use command-line commands to navigate the directory structure: pythagora/pythagora-core/workspace.

click to see this gif in a larger window


Switching Between Local and Cloud Development

Switching between local and cloud development is simple:


Databases

Pythagora uses MongoDB to manage application data. Database handling varies based on your development setup:

Local Development

  • By default, you can run MongoDB directly on your machine and access it via the command line.
  • Alternatively, you can use MongoDB Atlas to host your database in the cloud (separate from Pythagora's cloud).
  • Pythagora will prompt you to provide your MongoDB database URL during development. This can also be updated in your application's .env file.

Cloud Development

  • Pythagora manages a MongoDB instance in the cloud by default.
  • Access the database via VS Code’s terminal.
  • You can also modify your .env file to point to:
    1. A local MongoDB instance.
    2. A MongoDB Atlas database you manage in the cloud.

Summary

Feature Local Development Cloud Development
Setup Requires installation of dependencies. Requires only the VS Code extension.
File Storage On your local machine. Managed in Pythagora’s cloud.
Database Options Local MongoDB or MongoDB Atlas. Pythagora-managed MongoDB (default) or custom URL.
Best For Advanced users comfortable with setups. Users seeking quick and hassle-free environments.

If you have any questions, feel free to reach out to us on Discord or check our FAQ.

Clone this wiki locally