Quick Start Guide
This guide will walk you through creating your first polyglot project with PPM, combining JavaScript and Python in a single, unified workflow.What We’ll Build
A full-stack web application with:- React frontend (JavaScript/TypeScript)
- Flask backend (Python)
- Real-time data processing using NumPy and Pandas
- Unified development workflow with PPM
Prerequisites
Before starting, make sure you have:1
Install PPM
If you haven’t already, install PPM using our one-liner:Windows:macOS/Linux:
2
Verify Installation
3
Check Dependencies
Make sure you have Node.js and Python installed:
Step 1: Create a New Project
Initialize a new PPM project:project.toml
configuration file.
Step 2: Set Up Project Structure
Create the basic project structure:Step 3: Configure Dependencies
Edit theproject.toml
file to define your dependencies:
Step 4: Install Dependencies
Now install all dependencies with a single command:PPM will automatically:
- Create and activate a Python virtual environment
- Install all JavaScript packages in the appropriate directory
- Install all Python packages in the virtual environment
- Set up the project for development
Step 5: Create the Frontend
Frontend Package Configuration
Createfrontend/package.json
:
Vite Configuration
Createfrontend/vite.config.ts
:
React Application
Createfrontend/src/App.tsx
:
Entry Point and HTML
Createfrontend/src/main.tsx
:
frontend/index.html
:
Step 6: Create the Backend
Python Requirements
Createbackend/requirements.txt
:
Flask Application
Createbackend/app.py
:
Step 7: Run Your Application
Now comes the magic! Start both frontend and backend with a single command:- Start the Python Flask backend on port 5000
- Start the React development server on port 3000
- Run both simultaneously with proper environment activation
Step 8: See It in Action
- Open your browser to http://localhost:3000
- See the React frontend displaying data from the Python backend
- Click “Refresh Data” to see new random data generated by NumPy
- Watch the real-time communication between JavaScript and Python
What Just Happened?
Unified Dependencies
PPM installed both npm and pip packages from a single configuration file
Environment Management
Python virtual environment was created automatically, Node.js dependencies managed separately
Cross-Language Scripts
One command started both frontend and backend with proper environment activation
Seamless Integration
React frontend communicates with Python backend through well-configured CORS
Compare with Traditional Approach
Without PPM (Traditional)
With PPM
Next Steps
Now that you have a working polyglot application, explore more PPM features:Add More Dependencies
Learn how to add new JavaScript or Python packages
Advanced Configuration
Explore advanced project.toml configurations
Production Deployment
Set up CI/CD pipelines with PPM
More Examples
Explore more complex project examples
Troubleshooting
Frontend shows 'Network Error'
Frontend shows 'Network Error'
Make sure the Python backend is running on port 5000. Check the terminal for any Flask errors.
Python packages not found
Python packages not found
PPM creates a virtual environment automatically. If you see import errors, try:
Port already in use
Port already in use
If ports 3000 or 5000 are busy, you can change them in the configuration files or kill the processes using those ports.
🎉 Congratulations! You’ve built your first polyglot application with PPM. You’ve experienced firsthand how PPM eliminates the complexity of managing multiple package ecosystems while maintaining the power and flexibility of each language.