Skip to content

allyelvis/AenzbiStudio

Repository files navigation

Here's a detailed Markdown file for AenzbiStudio setup documentation. You can add this as a SETUP.md file in your project repository.


AenzbiStudio Setup Documentation

Overview

AenzbiStudio is a powerful cross-platform IDE developed by Ally Elvis Nzeyimana. It is designed to work seamlessly across multiple platforms (Android, Windows, cloud environments), making it a valuable tool for developers working on diverse projects. This guide provides instructions for setting up, building, and deploying AenzbiStudio from source.


Table of Contents

  1. Prerequisites
  2. Project Setup
  3. Installing Dependencies
  4. Configuring Project Scripts
  5. Building and Testing
  6. Documentation Generation
  7. Versioning and Deployment
  8. Troubleshooting
  9. Contributing
  10. License

Prerequisites

Ensure you have the following installed:

  • Git: Version control to manage and clone the repository.
  • Node.js and npm: Required for package management and running scripts.
  • Electron: The main runtime for AenzbiStudio.

Project Setup

  1. Clone the Repository
    Clone the AenzbiStudio repository and create a new feature branch.

    git clone https://github.com/allyelvis/AenzbiStudio.git
    cd AenzbiStudio
    git checkout -b feature/aenzbistudio-complete-setup
  2. Set Up Directory Structure
    Run the following commands to create the necessary project directories:

    mkdir -p src/{editor,project-manager,build,debugger}
    mkdir -p docs tests scripts

Installing Dependencies

This project uses npm for managing dependencies. The following dependencies are required:

  • Electron: For building and running cross-platform applications.
  • Monaco Editor: The code editor component.
  • Jest: Testing framework for JavaScript.

Install the dependencies with retry logic in case of network issues:

npm init -y
# Retry logic for installing each package
attempt_install() {
  local package=$1
  local attempts=3
  local delay=5
  local success=0

  for ((i = 1; i <= attempts; i++)); do
    echo "Installing $package (attempt $i)..."
    npm install "$package" && success=1 && break
    echo "Failed to install $package. Retrying in $delay seconds..."
    sleep $delay
  done

  if [[ $success -ne 1 ]]; then
    echo "Error: Failed to install $package after $attempts attempts."
    exit 1
  fi
}

attempt_install electron
attempt_install monaco-editor
attempt_install jest

Configuring Project Scripts

Update package.json to include custom scripts for building, testing, and running AenzbiStudio.

Replace your package.json with:

{
  "name": "AenzbiStudio",
  "version": "1.0.1",
  "scripts": {
    "start": "electron .",
    "build": "electron-packager . AenzbiStudio --platform=all --out=dist",
    "test": "jest"
  },
  "dependencies": {
    "electron": "^21.0.0",
    "monaco-editor": "^0.34.1"
  },
  "devDependencies": {
    "jest": "^29.0.0"
  }
}

Building and Testing

Running Tests

Before building, ensure all tests pass:

npm test

If tests fail, rerun them to confirm issues. Resolve any errors before proceeding.

Building the Project

To compile the project for all platforms and create a distributable package:

npm run build

Documentation Generation

Basic documentation is included to help users understand and navigate AenzbiStudio.

Create a docs/README.md with the following content:

# AenzbiStudio Documentation

## Overview
AenzbiStudio is a powerful cross-platform IDE developed by Ally Elvis Nzeyimana.

## Installation
- Clone the repository and run \`npm install\` to install dependencies.

## Usage
- \`npm start\`: Start the IDE.
- \`npm run build\`: Build for distribution.

Refer to the full documentation for more details on each module.

Versioning and Deployment

  1. Commit Changes
    After building and verifying functionality, commit all changes:

    git add .
    git commit -m "Complete setup and build for AenzbiStudio"
  2. Push to GitHub
    Push the feature branch to GitHub:

    git push origin feature/aenzbistudio-complete-setup
  3. Tag the Version
    Tagging helps track specific versions and releases:

    git tag -a "v1.0.1" -m "Release v1.0.1: Complete setup for AenzbiStudio"
    git push origin "v1.0.1"

Troubleshooting

  • Dependency Installation Issues: If npm install fails, use the retry logic provided in the script above.
  • Build Failures: Check error logs, confirm all dependencies are installed, and try running npm rebuild if needed.
  • Testing Failures: Run tests individually and debug as necessary. Use jest --watch for real-time feedback.

Contributing

To contribute:

  1. Fork the repository.
  2. Create a new branch.
  3. Make changes and ensure all tests pass.
  4. Submit a pull request for review.

License

This project is licensed under the MIT License. See LICENSE.md for more details.


This document provides all steps and necessary information for setting up, building, and deploying AenzbiStudio. For any further assistance, reach out via the developer’s LinkedIn profile.