Skip to content
Merged
143 changes: 137 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,142 @@ Midnight is a next-generation blockchain that protects user, business, and trans

Mesh Midnight provides tools, documentations, and education materials to remove the barriers preventing organizations and service providers from leveraging Midnight technology.

[midnight.meshjs.dev](https://midnight.meshjs.dev/)
Docs: [meshjs - midnight](https://midnight.meshjs.dev/)

# Buil the workspace
npm run clean
npm install
## Development

# Buil the package
npm run prepack:packages
This repository is a monorepo using [Turborepo](https://turbo.build/).

### Initial Setup

1. **Install dependencies from the root of the project:**

```bash
npm install
```

2. **Install Turbo globally (optional but recommended):**

```bash
npm install -g turbo
```

### Running Applications

You can run each application using the `turbo run dev` command with a filter for the specific application.

- **Docs Website**

To run the documentation website (`apps/docs`) in development mode:

```bash
turbo run dev --filter=@meshsdk/midnight-docs
```

The website will be available at [http://localhost:3000](http://localhost:3000).

- **Playground**

To run the playground application (`apps/playground/frontend`) in development mode:

```bash
turbo run dev --filter=frontend
```

The website will be available at [http://localhost:5173](http://localhost:5173).


### Building Packages

- **Build all packages:**

To build all the libraries in the `packages` directory:

```bash
npm run build:mesh
```

- **Build a specific package:**

You can build a single package by using a filter. For example, to build only the `@meshsdk/midnight-core` package:

```bash
turbo run build --filter=@meshsdk/midnight-core
```

Here are the package names for the other libraries:
- `@meshsdk/midnight-react`
- `@meshsdk/midnight-wallet`

### Preparing Packages for Publishing

To clean, build, and pack all packages for publishing, run the following command from the root:

```bash
npm run prepack:packages
```

## Repository Structure

This repository is a monorepo that contains the following:

- **`.github`**: Contains GitHub Actions workflows for CI/CD, issue templates, and pull request templates.
- **`apps`**: Contains standalone applications.
- **`docs`**: The documentation website for Mesh Midnight, built with Next.js.
- **`playground`**: A playground for developers to experiment with Mesh Midnight features.
- **`examples`**: A collection of example projects demonstrating how to use Mesh Midnight.
- **`packages`**: The source code for all the packages that make up Mesh Midnight.
- **`configs`**: Shared configurations for ESLint, Prettier, Jest, and TypeScript.
- **`mesh-midnight-cli`**: A command-line interface for interacting with Mesh Midnight.
- **`mesh-midnight-core`**: The core library for Mesh Midnight.
- **`mesh-midnight-react`**: React components for building UIs with Mesh Midnight.
- **`mesh-midnight-ui-templates`**: UI templates for common use cases.
- **`mesh-midnight-wallet`**: A package for wallet-related functionalities.
- **`scripts`**: Contains various scripts for automating repository tasks, such as version bumping.

## Related Projects

- **[Midnight Starter Template](https://github.com/MeshJS/midnight-starter-template)**: A template for business developers to get started with Midnight. It includes integrations with wallet tools and is framework-specific.
- **[Midnight Contracts](https://github.com/MeshJS/midnight-contracts)**: A resource for smart contract developers. It contains an `examples` folder showcasing contracts with providers, a CLI, and React components.

## Contributing

### Contribution Guidelines

This repository is meant to be forked as a starting point for new developments. You can:

- Fork the repository for your own project
- Contribute - Any PR is welcome to improve the template

If contributing:

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

### Code Standards

- Use TypeScript for all code
- Follow configured ESLint and Prettier
- Write tests for new features
- Document APIs and complex functions

### Commit Structure

- `feat`: new feature
- `fix`: bug fix
- `docs`: documentation
- `style`: code formatting
- `refactor`: refactoring
- `test`: tests
- `chore`: maintenance tasks

## License

This project is licensed under the Apache License. See the [LICENSE](LICENSE) file for details.

---

Made with ❤️ by the [meshjs team](https://github.com/MeshJS/midnight/graphs/contributors)
8 changes: 4 additions & 4 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
"build:apps": "next build",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'"
},
"dependencies": {
"next": "^14.1.1",
"dependencies": {
"next": "^15.5.2",
"nextra": "^3.3.1",
"nextra-theme-docs": "^3.3.1",
"pino": "^9.6.0" ,
"pino": "^9.6.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@graphql-eslint/eslint-plugin": "^4.4.0",
"@types/node": "^20",
"@types/node": "^20",
"eslint": "^9",
"eslint-config-next": "15.1.3",
"postcss": "^8",
Expand Down
4 changes: 2 additions & 2 deletions apps/playground/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"preview": "vite preview"
},
"dependencies": {
"@meshsdk/midnight-react": "*",
"@meshsdk/midnight-core": "*",
"@meshsdk/midnight-react": "*",
"@meshsdk/midnight-wallet": "*",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-slot": "^1.2.3",
"@tailwindcss/vite": "^4.1.11",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.533.0",
"pino": "^9.7.0",
"pino": "^8.17.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-router-dom": "^7.7.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/midnight-auction-token/ui-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"lenis": "1.1.9",
"lucide-react": "^0.475.0",
"motion": "^12.4.2",
"next": "15.1.7",
"next": "^15.5.2",
"next-themes": "^0.4.4",
"pg": "^8.13.3",
"postgres": "^3.4.4",
Expand Down
Loading
Loading