Skip to content

Appsmith

Haj Rezvan edited this page Dec 3, 2024 · 1 revision

πŸ“š Table of Contents

  1. Home
  2. Project Overview
  3. Features
  4. Installation
  5. Configuration
  6. Usage
  7. API Documentation
  8. Contributing
  9. License
  10. FAQ
  11. Troubleshooting
  12. Roadmap
  13. Contact

🏠 Home

Welcome to the Appsmith Project wiki! This repository contains everything you need to understand, install, use, and contribute to the Appsmith-based application. Whether you're a developer, contributor, or end-user, you'll find valuable information here.


πŸ“– Project Overview

Appsmith is an open-source framework designed to build internal tools quickly and efficiently. It allows developers to create custom dashboards, admin panels, and other essential business applications with minimal effort.

Objectives

  • Efficiency: Reduce the time required to build internal tools.
  • Flexibility: Provide a highly customizable platform to meet various business needs.
  • Scalability: Ensure the application can grow with your organization's requirements.
  • User-Friendly: Offer an intuitive interface for both developers and end-users.

Technology Stack

  • Frontend: React.js
  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • API: RESTful APIs
  • Authentication: JWT
  • Deployment: Docker, Kubernetes

⭐ Features

  • Drag-and-Drop UI Builder: Easily design your application's interface without writing code.
  • Connect to Any API or Database: Integrate with REST APIs, GraphQL, SQL/NoSQL databases, and more.
  • Customizable Widgets: Utilize a wide range of pre-built widgets or create your own.
  • Version Control: Track changes and collaborate seamlessly using Git.
  • Role-Based Access Control: Manage user permissions and access levels effectively.
  • Responsive Design: Ensure your application looks great on all devices.
  • Real-Time Data Updates: Reflect live data changes instantly within your app.

πŸ›  Installation

Follow these steps to set up the Appsmith project locally.

Prerequisites

Clone the Repository

git clone https://github.com/yourusername/appsmith-project.git
cd appsmith-project

Install Dependencies

npm install

Set Up Environment Variables

Create a .env file in the root directory and add the following variables:

PORT=8080
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=appsmith_db
JWT_SECRET=your_jwt_secret

Initialize the Database

Ensure PostgreSQL is running and create the necessary database:

CREATE DATABASE appsmith_db;

Run the Application

npm start

The application should now be running at http://localhost:8080.

Using Docker

Alternatively, you can use Docker to run the application:

docker-compose up --build

βš™οΈ Configuration

Configure your Appsmith project by modifying the .env file located in the root directory. Below are the primary configuration options:

# Server Configuration
PORT=8080

# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=appsmith_db

# Authentication
JWT_SECRET=your_jwt_secret

# Other Configurations

Detailed Configuration Options

  • PORT: The port on which the application will run.
  • DB_HOST: The hostname of your PostgreSQL database.
  • DB_PORT: The port number for your PostgreSQL database.
  • DB_USER: Your PostgreSQL username.
  • DB_PASSWORD: Your PostgreSQL password.
  • DB_NAME: The name of your PostgreSQL database.
  • JWT_SECRET: A secret key for JWT authentication.

πŸš€ Usage

Once the application is up and running, follow these steps to use it effectively.

Accessing the Application

Open your web browser and navigate to http://localhost:8080.

Logging In

  • Admin User: Use the default admin credentials or create a new admin account.
  • Regular Users: Depending on your setup, users can sign up or be invited by an admin.

Creating a New Project

  1. Click on the "Create New Project" button.
  2. Enter the project name and description.
  3. Select the type of application you want to build.

Building Your Interface

  • Drag-and-Drop Widgets: Use the sidebar to drag widgets onto the canvas.
  • Configure Widgets: Click on a widget to configure its properties and data bindings.
  • Preview: Use the preview mode to test your application in real-time.

Connecting Data Sources

  1. Navigate to the "Data Sources" section.
  2. Click on "Add New Data Source."
  3. Choose the type of data source (e.g., REST API, PostgreSQL).
  4. Enter the required connection details and test the connection.
  5. Save the data source for use in your application.

Deploying Your Application

Once satisfied with your application:

  1. Navigate to the "Deploy" section.
  2. Choose your deployment method (e.g., Docker, Kubernetes).
  3. Follow the provided instructions to deploy your application to your desired environment.

πŸ“œ API Documentation

Overview

This section provides detailed information about the APIs available in the Appsmith project. Use these APIs to integrate with other services or extend your application's functionality.

Authentication

All APIs require authentication via JWT. Include the token in the Authorization header:

Authorization: Bearer your_jwt_token

Endpoints

1. User Authentication

  • Login

    POST /api/auth/login

    Request Body:

    {
      "username": "your_username",
      "password": "your_password"
    }

    Response:

    {
      "token": "jwt_token",
      "user": {
        "id": "user_id",
        "username": "your_username",
        "email": "your_email"
      }
    }
  • Register

    POST /api/auth/register

    Request Body:

    {
      "username": "new_username",
      "password": "new_password",
      "email": "user_email"
    }

    Response:

    {
      "message": "User registered successfully."
    }

2. Projects

  • Get All Projects

    GET /api/projects

    Response:

    [
      {
        "id": "project_id",
        "name": "Project Name",
        "description": "Project Description",
        "createdAt": "timestamp",
        "updatedAt": "timestamp"
      },
      ...
    ]
  • Create a New Project

    POST /api/projects

    Request Body:

    {
      "name": "New Project",
      "description": "Project Description"
    }

    Response:

    {
      "id": "project_id",
      "name": "New Project",
      "description": "Project Description",
      "createdAt": "timestamp",
      "updatedAt": "timestamp"
    }
  • Get Project Details

    GET /api/projects/{projectId}

    Response:

    {
      "id": "project_id",
      "name": "Project Name",
      "description": "Project Description",
      "createdAt": "timestamp",
      "updatedAt": "timestamp"
    }
  • Update Project

    PUT /api/projects/{projectId}

    Request Body:

    {
      "name": "Updated Project Name",
      "description": "Updated Description"
    }

    Response:

    {
      "id": "project_id",
      "name": "Updated Project Name",
      "description": "Updated Description",
      "createdAt": "timestamp",
      "updatedAt": "timestamp"
    }
  • Delete Project

    DELETE /api/projects/{projectId}

    Response:

    {
      "message": "Project deleted successfully."
    }

3. Widgets

  • Get All Widgets

    GET /api/projects/{projectId}/widgets

    Response:

    [
      {
        "id": "widget_id",
        "type": "Button",
        "properties": { ... },
        "position": { ... },
        "createdAt": "timestamp",
        "updatedAt": "timestamp"
      },
      ...
    ]
  • Create a New Widget

    POST /api/projects/{projectId}/widgets

    Request Body:

    {
      "type": "Text",
      "properties": {
        "text": "Hello, World!",
        "color": "#000000"
      },
      "position": {
        "x": 100,
        "y": 200
      }
    }

    Response:

    {
      "id": "widget_id",
      "type": "Text",
      "properties": {
        "text": "Hello, World!",
        "color": "#000000"
      },
      "position": {
        "x": 100,
        "y": 200
      },
      "createdAt": "timestamp",
      "updatedAt": "timestamp"
    }

4. Data Sources

  • Get All Data Sources

    GET /api/projects/{projectId}/datasources

    Response:

    [
      {
        "id": "datasource_id",
        "type": "PostgreSQL",
        "connectionDetails": { ... },
        "createdAt": "timestamp",
        "updatedAt": "timestamp"
      },
      ...
    ]
  • Create a New Data Source

    POST /api/projects/{projectId}/datasources

    Request Body:

    {
      "type": "REST API",
      "connectionDetails": {
        "baseURL": "https://api.example.com",
        "headers": {
          "Authorization": "Bearer token"
        }
      }
    }

    Response:

    {
      "id": "datasource_id",
      "type": "REST API",
      "connectionDetails": {
        "baseURL": "https://api.example.com",
        "headers": {
          "Authorization": "Bearer token"
        }
      },
      "createdAt": "timestamp",
      "updatedAt": "timestamp"
    }

🀝 Contributing

We welcome contributions from the community! To contribute to the Appsmith project, please follow the guidelines below.

πŸ“ Guidelines

  1. Fork the Repository

    Fork the repository to your GitHub account.

  2. Clone the Fork

    git clone https://github.com/yourusername/appsmith-project.git
    cd appsmith-project
  3. Create a New Branch

    git checkout -b feature/your-feature-name
  4. Make Changes

    Implement your feature or fix the bug.

  5. Commit Your Changes

    git commit -m "Add feature: your-feature-name"
  6. Push to Your Fork

    git push origin feature/your-feature-name
  7. Create a Pull Request

    Navigate to the original repository and create a pull request from your fork.

πŸ› Reporting Issues

If you encounter any issues, please open an issue in the repository with relevant details.

πŸ“‹ Code of Conduct

Please adhere to our Code of Conduct to ensure a welcoming and respectful environment for all contributors.


πŸ“„ License

This project is licensed under the MIT License.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy...

For more details, refer to the LICENSE file.


❓ FAQ

1. What is Appsmith?

Appsmith is an open-source framework that enables developers to build custom internal tools rapidly with minimal coding.

2. How can I get support?

You can get support by opening an issue in the GitHub Issues section or by joining our community Slack/Discord.

3. Can I customize the widgets?

Yes, all widgets are customizable. You can modify their properties directly in the UI builder or extend them by creating custom widgets.

4. Is there a demo available?

Yes, you can access the demo at https://demo.yourapp.com.

5. How do I deploy the application to production?

Refer to the Installation and Configuration sections for deployment instructions using Docker or Kubernetes.


πŸ›  Troubleshooting

1. Application Not Starting

  • Symptoms: The application fails to start, and you see errors in the terminal.
  • Solutions:
    • Ensure all environment variables are correctly set.
    • Verify that the database is running and accessible.
    • Check if the required ports are not occupied by other services.

2. Database Connection Issues

  • Symptoms: Unable to connect to the PostgreSQL database.
  • Solutions:
    • Verify the database credentials in the .env file.
    • Ensure PostgreSQL is running and listening on the correct port.
    • Check for network issues or firewall restrictions.

3. API Requests Failing

  • Symptoms: API endpoints return errors or do not respond.
  • Solutions:
    • Ensure the server is running without errors.
    • Check the network connectivity.
    • Verify that the JWT token is correctly included in the Authorization header.

4. UI Not Rendering Properly

  • Symptoms: The application UI is misaligned or widgets are not displaying as expected.
  • Solutions:
    • Clear the browser cache and reload the page.
    • Check for any CSS errors in the browser console.
    • Ensure that all required dependencies are installed.

5. Error Logs

  • Accessing Logs: Check the terminal where the application is running for real-time logs.
  • Log Files: If configured, refer to the log files stored in the logs/ directory.

πŸ›£ Roadmap

Upcoming Features

  • Enhanced Widget Library: Introduce more customizable widgets.
  • Advanced Authentication: Support for OAuth and Single Sign-On (SSO).
  • Real-Time Collaboration: Enable multiple users to collaborate on the same project simultaneously.
  • Integrations: Expand integrations with third-party services like Slack, GitHub, and more.
  • Performance Improvements: Optimize the application's performance for larger datasets.

Future Goals

  • Mobile Support: Develop a mobile version of the application.
  • AI Integrations: Incorporate AI-driven features for smarter data handling.
  • Localization: Support multiple languages for a global user base.
  • Comprehensive Testing: Implement end-to-end testing to ensure reliability.

If you have suggestions or want to contribute to the roadmap, feel free to open an issue.


πŸ“¬ Contact

For any questions, suggestions, or feedback, please reach out to us:

You can also open an issue on GitHub.


πŸ“Ž Additional Resources