Skip to content

akshad-exe/Js2Move

Repository files navigation

Js2Move β€” Complete Movement Development Platform

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.

🎯 What This Does

Write .movejs β†’ Compile to .move β†’ Deploy to Blockchain
(JS-like DSL)   (Our Compiler)    (One-Click Deploy) ⭐ NEW!

✨ Features

Compilation

  • πŸ”„ DSL Compiler: Transform .movejs β†’ .move source code
  • πŸ§ͺ Auto-Generated Tests: Fixture-based testing system
  • πŸ“š Rich Examples: Learn MoveJS with progressive examples

Deployment ⭐ NEW!

  • πŸš€ 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

Developer Tools

  • πŸ› οΈ 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

Infrastructure

  • πŸ“¦ 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

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • PNPM 8+
  • Docker (optional)

Installation

  1. Clone this repository

    git clone <your-repo-url>
    cd Js2Move
  2. Install dependencies

    pnpm install
  3. Start development

    # Start all services
    ./scripts/dev-all.sh
    
    # Or start individually
    pnpm --filter @js2move/backend dev
    pnpm --filter @js2move/frontend dev

πŸ—οΈ Codebase Structure

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>

Environment Variables

Create .env files in respective packages:

# Backend (.env)
DATABASE_URL=
RPC_ENDPOINT=

# Frontend (.env.local)
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_CHAIN_ID=

⚠️ Ignored files

This repository's .gitignore excludes sensitive files and generated build artifacts. Common ignored patterns include:

  • node_modules/
  • .env* (do not commit secrets; add .env.example instead)
  • .next/ (Next.js build outputs)
  • build/ or /out/ (build artifacts)
  • coverage/ (test coverage reports)
  • logs and *.log
  • .vercel, .DS_Store

Keep a .env.example checked in with non-sensitive defaults so collaborators know which variables to provide.

πŸ”¨ Build & Deploy

Build All Packages

# Build all packages
pnpm -r build

# Build specific package
pnpm --filter @js2move/contracts build

Docker Support

# Build and run with Docker Compose
cd docker
docker-compose up -d

# Stop services
docker-compose down

πŸ“š Package Documentation

Each 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

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • 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

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Generated from akshad-exe/Web3-Monorepo