Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions .history/README_20250809205828.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<h1 align="center" style="border-bottom: none">
<b>
<a href="https://www.appflowy.com">AppFlowy</a><br>
</b>
⭐️ The Open Source Alternative To Notion ⭐️ <br>
</h1>

<p align="center">
AppFlowy is the AI workspace where you achieve more without losing control of your data
</p>

<p align="center">
<a href="https://discord.gg/9Q2xaN37tV"><img src="https://img.shields.io/badge/AppFlowy.IO-discord-orange"></a>
<a href="https://github.com/AppFlowy-IO/appflowy"><img src="https://img.shields.io/github/stars/AppFlowy-IO/appflowy.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
<a href="https://github.com/AppFlowy-IO/appflowy"><img src="https://img.shields.io/github/forks/AppFlowy-IO/appflowy.svg"></a>
<a href="https://opensource.org/licenses/AGPL-3.0"><img src="https://img.shields.io/badge/license-AGPL-purple.svg" alt="License: AGPL"></a>

</p>

<p align="center">
<a href="https://www.appflowy.com"><b>Website</b></a> •
<a href="https://forum.appflowy.io/"><b>Forum</b></a> •
<a href="https://discord.gg/9Q2xaN37tV"><b>Discord</b></a> •
<a href="https://www.reddit.com/r/AppFlowy"><b>Reddit</b></a> •
<a href="https://twitter.com/appflowy"><b>Twitter</b></a>
</p>

<p align="center"><img src="https://appflowy.com/_next/static/media/tasks.796c753e.png" alt="AppFlowy Kanban Board for To-dos" /></p>
<p align="center"><img src="https://appflowy.com/_next/static/media/Grid.9e30484b.png" alt="AppFlowy Databases for Tasks and Projects" /></p>
<p align="center"><img src="https://appflowy.com/_next/static/media/sites.a8d5b2b9.png" alt="AppFlowy Sites for Beautiful documentation" /></p>
<p align="center"><img src="https://appflowy.com/_next/static/media/ai.e1460982.png" alt="AppFlowy AI" /></p>
<p align="center"><img src="https://appflowy.com/_next/static/media/template.9ea13c3b.png" alt="AppFlowy Templates" /></p>

<br></br>
<p align="center" >
<img src="https://github.com/user-attachments/assets/5841c491-b564-4a26-b9b6-191def430911" alt="Work across devices" width="1040px" /></p>
<p align="center" >
<img src="https://github.com/user-attachments/assets/c2ba6bb8-746c-4743-9393-d008a669be95" alt="Work across devices" width="1040px" /></p>
<p align="center" >
<img src="https://github.com/user-attachments/assets/e83dd1a3-4975-4d0e-91a1-9eb6e0d248cd" alt="Work across devices" width="1040px" /></p>

## User Installation

- [Download AppFlowy Desktop (macOS, Windows, and Linux)](https://github.com/AppFlowy-IO/AppFlowy/releases)
- Other
channels: [FlatHub](https://flathub.org/apps/io.appflowy.AppFlowy), [Snapcraft](https://snapcraft.io/appflowy), [Sourceforge](https://sourceforge.net/projects/appflowy/)
- Available on
- [App Store](https://apps.apple.com/app/appflowy/id6457261352): iPhone
- [Play Store](https://play.google.com/store/apps/details?id=io.appflowy.appflowy): Android 10 or above; ARMv7 is
not supported
- [Self-hosting AppFlowy](https://appflowy.com/docs/self-host-appflowy-overview)
- [Source](https://docs.appflowy.io/docs/documentation/appflowy/from-source)

## Built With

- [Flutter](https://flutter.dev/)

- [Rust](https://www.rust-lang.org/)

## Stay Up-to-Date

<p align="center"><img src="https://github.com/AppFlowy-IO/appflowy/blob/main/doc/imgs/howtostar.gif" alt="AppFlowy Github - how to star the repo" width="100%" /></p>

## Getting Started with development

Please view our comprehensive [build from source guide](doc/BUILD_FROM_SOURCE.md) for detailed OS-specific development instructions, including desktop and mobile platform support.

For additional documentation, visit [docs.appflowy.io](https://docs.appflowy.io/docs/documentation/appflowy/from-source).

## Roadmap

- [AppFlowy Roadmap ReadMe](https://docs.appflowy.io/docs/appflowy/roadmap)
- [AppFlowy Public Roadmap](https://github.com/orgs/AppFlowy-IO/projects/5/views/12)

If you'd like to propose a feature, submit a feature
request [here](https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&template=feature_request.yaml&title=%5BFR%5D+) <br/>
If you'd like to report a bug, submit a bug
report [here](https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&template=bug_report.yaml&title=%5BBug%5D+)

## **Releases**

Please see the [changelog](https://appflowy.com/what-is-new) for more details about a given release.

## Contributing

Contributions make the open-source community a fantastic place to learn, inspire, and create. Any contributions you make
are **greatly appreciated**. Please look
at [Contributing to AppFlowy](https://docs.appflowy.io/docs/documentation/software-contributions/contributing-to-appflowy)
for details.

If your Pull Request is accepted as it fixes a bug, adds functionality, or makes AppFlowy's codebase significantly
easier to use or understand, **Congratulations!** If your administrative and managerial work behind the scenes sustains
the community, **Congratulations!** You are now an official contributor to AppFlowy.

## Translations 🌎🗺

[![translation badge](https://inlang.com/badge?url=github.com/AppFlowy-IO/AppFlowy)](https://inlang.com/editor/github.com/AppFlowy-IO/AppFlowy?ref=badge)

To add translations, you can manually edit the JSON translation files in `/frontend/resources/translations`, use
the [inlang online editor](https://inlang.com/editor/github.com/AppFlowy-IO/AppFlowy), or
run `npx inlang machine translate` to add missing translations.

## Join the community to build AppFlowy together

<a href="https://github.com/AppFlowy-IO/AppFlowy/graphs/contributors">
<img src="https://contrib.rocks/image?repo=AppFlowy-IO/AppFlowy" />
</a>

## Why Are We Building This?

Notion has been our favourite project and knowledge management tool in recent years because of its aesthetic appeal and
functionality. Our team uses it daily, and we are on its paid plan. However, as we all know, Notion has its limitations.
These include weak data security and poor compatibility with mobile devices. Likewise, alternative collaborative
workplace management tools also have their constraints.

The limitations we encountered using these tools and our past work experience with collaborative productivity tools have
led to our firm belief that there is a glass ceiling on what's possible for these tools in the future. This emanates
from the fact that these tools will probably struggle to scale horizontally at some point and be forced to prioritize a
proportion of customers whose needs differ from the rest. While decision-makers want a workplace OS, it is impossible to
come up with a one-size fits all solution in such a fragmented market.

When a customer's evolving core needs are not satisfied, they either switch to another or build one from the ground up,
in-house. Consequently, they either go under another ceiling or buy an expensive ticket to learn a hard lesson. This is
a requirement for many resources and expertise, building a reliable and easy-to-use collaborative tool, not to mention
the speed and native experience. The same may apply to individual users as well.

All these restrictions necessitate our mission - to make it possible for anyone to create apps that suit their needs
well.

- To individuals, we would like to offer Notion's functionality, data security, and cross-platform native experience.
- To enterprises and hackers, AppFlowy is dedicated to offering building blocks and collaboration infra services to
enable you to make apps on your own. Moreover, you have 100% control of your data. You can design and modify AppFlowy
your way, with a single codebase written in Flutter and Rust supporting multiple platforms armed with long-term
maintainability.

We decided to achieve this mission by upholding the three most fundamental values:

- Data privacy first
- Reliable native experience
- Community-driven extensibility

We do not claim to outperform Notion in terms of functionality and design, at least for now. Besides, our priority
doesn't lie in more functionality at the moment. Instead, we would like to cultivate a community to democratize the
knowledge and wheels of making complex workplace management tools while enabling people and businesses to create
beautiful things on their own by equipping them with a versatile toolbox of building blocks.

## License

Distributed under the AGPLv3 License. See [`LICENSE.md`](https://github.com/AppFlowy-IO/AppFlowy/blob/main/LICENSE) for
more information.

## Acknowledgments

Special thanks to these amazing projects which help power AppFlowy:

- [cargo-make](https://github.com/sagiegurari/cargo-make)
- [contrib.rocks](https://contrib.rocks)
- [flutter_chat_ui](https://pub.dev/packages/flutter_chat_ui)
219 changes: 219 additions & 0 deletions .history/doc/BUILD_FROM_SOURCE_20250809205822.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# Building AppFlowy from Source

This guide provides comprehensive instructions for building AppFlowy from source code on all supported platforms.

## Prerequisites

Before building AppFlowy, ensure you have the following installed:

### All Platforms
- [Git](https://git-scm.com/)
- [Rust](https://rustup.rs/) (1.70 or later)
- [Flutter](https://flutter.dev/docs/get-started/install) (3.13.19 or later)
- [cargo-make](https://github.com/sagiegurari/cargo-make) - Install with: `cargo install cargo-make`

### Platform-Specific Requirements

#### Windows
- [Visual Studio 2019/2022](https://visualstudio.microsoft.com/) with C++ development tools
- [vcpkg](https://github.com/microsoft/vcpkg)

#### macOS
- Xcode Command Line Tools: `xcode-select --install`

#### Linux
- Build essentials: `sudo apt install build-essential pkg-config libssl-dev`
- Additional dependencies: `sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev`

## Building for Desktop

### 1. Clone the Repository
```bash
git clone https://github.com/AppFlowy-IO/AppFlowy.git
cd AppFlowy
```

### 2. Build for Your Platform

#### Windows
```bash
cd frontend
cargo make appflowy-windows
```

#### macOS
```bash
cd frontend
cargo make appflowy-macos
```

#### Linux
```bash
cd frontend
cargo make appflowy-linux
```

### 3. Run the Application

After building, the executable will be located in:
- **Windows**: `frontend/appflowy_flutter/product/[version]/windows/Release/AppFlowy/`
- **macOS**: `frontend/appflowy_flutter/product/[version]/macos/Release/AppFlowy.app/`
- **Linux**: `frontend/appflowy_flutter/product/[version]/linux/Release/AppFlowy/`

## Building for Mobile

### iOS

#### Prerequisites
- macOS with Xcode installed
- iOS development setup for Flutter

#### Build Steps
```bash
cd frontend
cargo make appflowy-ios
```

The iOS app will be built and available in `frontend/appflowy_flutter/build/ios/`.

### Android

#### Prerequisites

**All Platforms:**
- [Android NDK](https://developer.android.com/ndk/downloads/) version 24
- cargo-ndk: `cargo install cargo-ndk`

**Additional Setup:**

1. **Set Environment Variables**

**Windows:**
```cmd
set ANDROID_NDK_HOME=C:\Users\%USERNAME%\AppData\Local\Android\Sdk\ndk\24.0.8215888
```

**macOS/Linux:**
```bash
export ANDROID_NDK_HOME=~/Android/Sdk/ndk/24.0.8215888
```

2. **Configure Cargo for Android**

Create or edit `~/.cargo/config` (Linux/macOS) or `%USERPROFILE%\.cargo\config` (Windows):

**Linux/macOS:**
```toml
[target.aarch64-linux-android]
ar = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
linker = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang"

[target.armv7-linux-androideabi]
ar = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
linker = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi29-clang"

[target.i686-linux-android]
ar = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
linker = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android29-clang"

[target.x86_64-linux-android]
ar = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
linker = "/home/user/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android29-clang"
```

**Windows:**
```toml
[target.aarch64-linux-android]
ar = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\llvm-ar.exe"
linker = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\aarch64-linux-android29-clang.exe"

[target.armv7-linux-androideabi]
ar = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\llvm-ar.exe"
linker = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\armv7a-linux-androideabi29-clang.exe"

[target.i686-linux-android]
ar = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\llvm-ar.exe"
linker = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\i686-linux-android29-clang.exe"

[target.x86_64-linux-android]
ar = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\llvm-ar.exe"
linker = "C:\\Users\\%USERNAME%\\AppData\\Local\\Android\\Sdk\\ndk\\24.0.8215888\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\x86_64-linux-android29-clang.exe"
```

3. **NDK 24 Clang Fix**

Create a file named `libgcc.a` with this content:
```
INPUT(-lunwind)
```

**Linux/macOS:** Place it in `Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/14.0.1/lib/linux/`

**Windows:** Place it in `Android\Sdk\ndk\24.0.8215888\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\14.0.1\lib\linux\`

Copy this file to the following subdirectories: `aarch64`, `arm`, `i386`, and `x86_64`.

#### Build Steps
```bash
cd frontend
cargo make appflowy-android
```

The Android APK will be built and available in `frontend/appflowy_flutter/build/app/outputs/flutter-apk/`.

## Development Builds

For faster development builds without optimizations:

### Desktop Development
```bash
cd frontend
cargo make appflowy-dev # Uses platform-specific aliases
```

### Mobile Development
```bash
# iOS development build
cd frontend
cargo make appflowy-ios-dev

# Android development build
cd frontend
cargo make appflowy-android-dev
```

## Troubleshooting

### Common Issues

1. **Flutter Doctor Issues**: Run `flutter doctor` to check for missing dependencies
2. **Rust Version**: Ensure you're using Rust 1.70 or later
3. **Path Issues**: Make sure all tools are in your system PATH
4. **NDK Issues**: Verify ANDROID_NDK_HOME is set correctly

### Platform-Specific Issues

#### Windows
- Ensure Visual Studio C++ tools are installed
- Check that vcpkg is properly configured
- Use PowerShell or Command Prompt, not Git Bash for building

#### macOS
- Ensure Xcode Command Line Tools are installed
- For iOS builds, you need a full Xcode installation

#### Linux
- Install all required system dependencies
- Check that pkg-config can find required libraries

### Getting Help

- Check the [AppFlowy Documentation](https://docs.appflowy.io/)
- Join our [Discord](https://discord.gg/9Q2xaN37tV) for community support
- Report issues on [GitHub](https://github.com/AppFlowy-IO/AppFlowy/issues)

## Additional Resources

- [AppFlowy Development Guide](https://docs.appflowy.io/docs/documentation/appflowy/from-source)
- [Contributing Guidelines](CONTRIBUTING.md)
- [Android-specific instructions](../frontend/appflowy_flutter/android/README.md)
Loading