This guide helps you get started developing APITable.
Make sure you have the following dependencies and programming languages installed before setting up your developer environment:
git
- docker
- docker-compose v2
make
If you are using macOS or Linux.
We recommend install programming language with SDK manager sdkman
and nvm
.
# quick install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
# quick install sdkman
curl -s "https://get.sdkman.io" | bash
# install nodejs
nvm install 16.15.0 && nvm use 16.15.0 && corepack enable
# install java development kit
sdk env install
# install rust toolchain
curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly --profile minimal -y && source "$HOME/.cargo/env"
We recommend using Homebrew for installing any missing dependencies:
## necessary required
brew install git
brew install --cask docker
brew install make
brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman
On CentOS / RHEL or other Linux distribution with yum
sudo yum install git
sudo yum install make
On Ubuntu / Debian or other Linux distribution with apt
sudo apt update
sudo apt install git
sudo apt install make
If you are running APITable on Windows 10/11, we recommend installing Docker Desktop on Windows, Ubuntu on WSL and Windows Terminal, You can learn more about Windows Subsystem for Linux (WSL) in the official site.
Install missing dependencies on Ubuntu using apt
:
sudo apt update
sudo apt install git
sudo apt install make
We use make
as our centric build tool entry that drives other build tool like gradle
/ npm
/ yarn
.
So you can just input make
command and see all build commands:
make
APITable consists of 3 processes:
- backend-server
- room-server
- web-server
To start the development environment locally, run these commands:
# start databases in dockers
make dataenv
# install dependencies
make install
#start backend-server
make run # enter 1
# and then switch to a new terminal
# start room-server
make run # enter 2
# and then switch to a new terminal
# start web-server
make run # enter 3
We recommend you use Visual Studio Code
or Intellij IDEA
for your IDE.
APITable have prepared these two IDE's debug configs.
Just open APITable's root directory with IDE.
We have two ways to improve the translation of APITable:
- You can modify the markdown files in source code and create a PR directly
- Join our Crowdin to find the
strings
to modify
In the collaboration of multilingual translation, we follow the following process:
By default, APITable doesn't configure the SMTP server, which means you cannot invite users since it require the email sending feature.
It is needed to modify .env
configuration using self email, and restart backend server.
MAIL_ENABLED=true
MAIL_HOST=smtp.xxx.com
MAIL_PASSWORD=your_email_password
MAIL_PORT=465
MAIL_SSL_ENABLE=true
MAIL_TYPE=smtp
MAIL_USERNAME=your_email
In addition, some mailboxes need to be enabled in the background to use smtp. For details, you can search for xxx mailbox smtp tutorial.
You can access the API documentation by starting a local server:
-
The documentation address for the Backend server is: http://localhost:8081/api/v1/doc.html
-
The documentation address for the Room server is: http://localhost:3333/nest/v1/docs
If you are interested in cloud service API interfaces, you can also directly access the online API documentation at https://developers.apitable.com/api/introduction.
This can be achieved by setting the DSB_WIDGET_MAX_COUNT
parameter in the .env
file.
In the .env.default
file of room-server
, there are two parameters that can adjust request frequency:
-
You can set
LIMIT_POINTS
andLIMIT_DURATION
to indicate the number of requests that can be made in a unit time period. Where LIMIT_POINTS is the number of times and LIMIT_DURATION is the duration, measured in seconds. -
You can set the parameter
LIMIT_WHITE_LIST
to set a separate request frequency for specific users. Its value is a JSON string, and its structure can refer toMap<string, IBaseRateLimiter>
.
This can be achieved by setting the API_MAX_MODIFY_RECORD_COUNTS
parameter in the .env.default
file of room-server
.
Configuration properties in the .env
file can also be overridden by specifying them env vars NGINX_HTTP_PORT
For example. It would be set as NGINX_HTTP_PORT=8080