Js2Move is a complete development platform for Movement blockchain. Write smart contracts in JavaScript-like syntax, compile to Move, and deploy with one click.
Think Hardhat for Movement - Write, compile, test, and deploy all in one place.
Write .movejs β Compile to .move β Deploy to Blockchain
(JS-like DSL) (Our Compiler) (One-Click Deploy) β NEW!
- π DSL Compiler: Transform
.movejsβ.movesource code - π§ͺ Auto-Generated Tests: Fixture-based testing system
- π Rich Examples: Learn MoveJS with progressive examples
- π One-Click Deploy: Deploy from web UI with a button
- π» CLI Deployment:
movejs deploy Token.movejs --network testnet - π Deployment Tracking: See all your deployed contracts
- π Multi-Network: Deploy to testnet or mainnet
- π οΈ CLI Tool: Compile and deploy from command line
- π Web IDE: Online editor with compilation and deployment
- π‘ API Service: REST API for programmatic access
- βοΈ Backend Services: API + blockchain indexer + deployment service
- π¦ Monorepo: PNPM workspace with optimized package management
- π TypeScript: Full type safety across all packages
- π³ Docker Support: Containerized development
- π CI/CD Ready: GitHub Actions workflows included
- Node.js 18+
- PNPM 8+
- Docker (optional)
-
Clone this repository
git clone <your-repo-url> cd Js2Move
-
Install dependencies
pnpm install
-
Start development
# Start all services ./scripts/dev-all.sh # Or start individually pnpm --filter @js2move/backend dev pnpm --filter @js2move/frontend dev
Js2Move/
βββ packages/
β βββ compiler/ # Core compiler (lexer β parser β generator)
β β βββ src/
β β β βββ lexer/ # Tokenization
β β β βββ parser/ # AST building
β β β βββ generator/ # Move code generation
β β β βββ templates/ # Code generation templates
β β βββ examples/ # Sample .movejs files
β β βββ tests/fixtures/ # Auto-discovered test cases
β βββ cli/ # Command-line interface
β βββ backend/ # API service + indexer
β βββ sdk/ # JavaScript/TypeScript SDK
β βββ shared-types/ # Shared TypeScript types
βββ frontend/ # Next.js 14 web application
βββ docker/ # Docker configurations
βββ docs/ # Documentation
βββ PROJECT_OVERVIEW.md # Complete project explanation
βββ QUICK_START.md # New team member guide
βββ pnpm-worcompiler` | DSL compiler (lexer, parser, generator) | 0.1.0 |
| `@js2move/cli` | Command-line compilation tool | 0.1.0 |
| `@js2move/backend` | API service & blockchain indexer
## π¦ Packages
| Package | Description | Version |
|---------|-------------|---------|
| `@js2move/backend` | Node.js API & blockchain indexer | 0.1.0 |
| `@js2move/contracts` | Move smart contracts | 0.1.0 |
| `@js2move/sdk` | JavaScript/TypeScript SDK | 0.1.0 |
| `@js2move/shared-types` | Shared TypeScript types | 0.1.0 |
| `@js2move/frontend` | Next.js 14 web application | 0.1.0 |
## π§ Configuration
### Workspace Management
This repository uses PNPM workspaces. Key commands:
```bash
# Install dependencies for all packages
pnpm install
# Run command in specific package
pnpm --filter @js2move/backend <command>
# Run command in all packages
pnpm -r <command>
# Add dependency to specific package
pnpm --filter @js2move/backend add <package>
Create .env files in respective packages:
# Backend (.env)
DATABASE_URL=
RPC_ENDPOINT=
# Frontend (.env.local)
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_CHAIN_ID=This repository's .gitignore excludes sensitive files and generated build artifacts. Common ignored patterns include:
node_modules/.env*(do not commit secrets; add.env.exampleinstead).next/(Next.js build outputs)build/or/out/(build artifacts)coverage/(test coverage reports)logsand*.log.vercel,.DS_Store
Keep a .env.example checked in with non-sensitive defaults so collaborators know which variables to provide.
# Build all packages
pnpm -r build
# Build specific package
pnpm --filter @js2move/contracts build# Build and run with Docker Compose
cd docker
docker-compose up -d
# Stop services
docker-compose downEach package has its own README with specific setup and usage instructions:
- Backend - API and indexer documentation
- Contracts - Smart contract development guide
- SDK - SDK usage and API reference
- Shared Types - Type definitions reference
Contributions are welcome! Please read our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Blockchain infrastructure providers and the Web3 community for inspiration and tooling
- PNPM for workspace management
- The Web3 community for inspiration and best practices
Built with β€οΈ for the Move Ecosystem