Skip to main content

The Full Stack

Meteor is a complete platform for building modern web applications. Unlike traditional stacks where you assemble different tools, Meteor provides an integrated solution from database to deployment.
With Meteor, you write JavaScript across your entire stack: database queries, server logic, client code, and build configuration all use the same language and paradigms.

The Meteor Stack

Technology Layers

Database Layer

MongoDB + Minimongo
  • Server: MongoDB with Node.js driver
  • Client: Minimongo (in-memory cache)
  • Automatic synchronization via DDP

Data Layer

DDP Protocol
  • WebSocket-based real-time protocol
  • Publications for data subscriptions
  • Methods for RPC calls
  • Latency compensation

Server Layer

Node.js + Express
  • Built on Node.js runtime
  • Express-based HTTP server (webapp)
  • Async/await throughout
  • npm package ecosystem

Client Layer

Modern Browser
  • React, Vue, Blaze, or Svelte
  • ES2015+ JavaScript
  • Hot Module Replacement
  • Service workers support

Build Layer

Isobuild
  • Universal build system
  • Multi-architecture compilation
  • Tree shaking and code splitting
  • Modern bundler (Rspack)

Reactivity Layer

Tracker
  • Transparent reactivity
  • Automatic UI updates
  • Computation graph
  • Framework integration

Building a Complete App

Let’s build a task management app to see how all pieces work together.

1. Define the Data Model

Create collections that work on both client and server:
imports/api/tasks/tasks.js

2. Create Server Methods

Define server-side business logic:
imports/api/tasks/methods.js

3. Create Publications

Define what data clients can access:
imports/api/tasks/publications.js

4. Build the UI (React)

Create reactive components:
imports/ui/TaskList.jsx
imports/ui/TaskItem.jsx

5. Wire It Up

Connect everything in the entry points:
server/main.js
client/main.js

Authentication

Add user accounts:
imports/ui/App.jsx

Deployment

Build for Production

Deploy to Galaxy

Deploy Anywhere

Meteor apps are standard Node.js apps:

Testing

Unit Tests

imports/api/tasks/methods.test.js

Integration Tests

tests/main.js
Run tests:

Best Practices

Use schema validation and runtime checks:
Remove autopublish and insecure packages:
Always validate user permissions:
Meteor 3.x is fully async:

Performance Optimization

Database Indexes

Selective Publications

Method Optimization

Explore the Source

Dive into the Meteor source code to learn more about how everything works together