Skip to main content

Create Your First Meteor App

Get up and running with Meteor in just a few commands. This guide will have you building a functional application in under 10 minutes.
1

Create a New Project

Use the meteor create command to scaffold a new application:
This creates a new directory with a complete Meteor application using React and Rspack (the default in Meteor 3.4+).
You can also create apps with different templates:
2

Navigate to Your Project

Change into your new project directory:
3

Start the Development Server

Run your application:
Meteor will:
  • Start the development server
  • Launch the embedded MongoDB database
  • Build your application
  • Open your app at http://localhost:3000
The first run may take a minute as Meteor downloads dependencies. Subsequent starts are much faster.
4

See Your App Running

Open your browser to http://localhost:3000 and you’ll see your new Meteor application!The default app includes:
  • A welcome message
  • Sample data from MongoDB
  • Hot Module Replacement (HMR) enabled
  • React Fast Refresh configured

Project Structure

Your new Meteor app has the following structure:
The client/ directory contains code that runs in the browser:

Your First Changes

Let’s make some changes to see Hot Module Replacement in action:
1

Open the App Component

Edit imports/ui/App.jsx in your favorite code editor.
2

Modify the Header

Change the header text:
Save the file and watch your browser update instantly without losing state!
3

Add a New Task Component

Create a new file imports/ui/TaskForm.jsx:
4

Use the Form Component

Import and use it in App.jsx:
You now have a working form that adds tasks in real-time!

Understanding Meteor’s Magic

Real-Time Data Synchronization

Meteor automatically synchronizes data between the client and server:
No REST APIs to write. No websocket code. No polling. Meteor handles all data synchronization automatically through DDP (Distributed Data Protocol).

Isomorphic JavaScript

Write code once, run it everywhere:

Integrated Build System

Meteor automatically:
  • ✅ Transpiles ES6+ and JSX
  • ✅ Bundles your code
  • ✅ Hot reloads changes
  • ✅ Handles imports
  • ✅ Optimizes for production

Common Commands

Here are the most useful Meteor commands:

User Accounts

Routing (React Router)

UI Libraries

Development Tips

Use meteor npm instead of npm: This ensures you’re using the npm version bundled with Meteor, avoiding version conflicts.
Install the Meteor DevTools Extension: Available for Chrome and Firefox, it helps debug publications, methods, and data flow.
Enable Source Maps: Add METEOR_PROFILE=1 meteor to get detailed performance profiling.
Remove insecure and autopublish before deploying: These packages are helpful for prototyping but allow unrestricted database access.

Next Steps

You now have a working Meteor application! Here’s what to explore next:

Complete Tutorial

Build a full-featured To-Do app with authentication, filtering, and more.

API Reference

Dive deep into Collections, Methods, Publications, and Accounts.

Deployment

Learn how to deploy your app to Galaxy, Heroku, or your own server.

Testing

Write tests for your Meteor application with TinyTest or Jest.

Get Help

Forums

Ask questions and get help from the community.

Discord

Chat with other Meteor developers in real-time.

GitHub

Report bugs and request features.