diff --git a/README.md b/README.md index e3ccfb5..4a108a1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,107 @@ -# spl-token-faucet -Generic Solana spl-token faucet webapp +
A simple dashboard to manage Solana SPL tokens
+ + + + +--- + +## Features + +- Create, mint, and transfer SPL tokens +- Mainnet and devnet support +- Configurable RPCs +- Compatible with Phantom, Solflare, Torus, Sollet, Glow and Slope wallets +- 2 different operation modes: wallet-based and server-based + + +## Using the program + +### Wallet-based mode + +This mode is only operational when a wallet is connected. + +When using this mode, the creation, minting and transfer of tokens will be performed by the connected wallet account. +The displayed available tokens will be the ones belonging to the wallet account plus the ones available in server mode. + +### Server-based mode + +This mode is only operational when no wallet is connected. + +When using this mode, the creation, minting and transfer of tokens is performed by a account configured in the server. +Newly created tokens will be stored in a dedicated database. The displayed tokens will be those configured within the application config file, plus the later added tokens found in the database. + +When using mainnet with this mode, the creation of new tokens is not enabled by default, since it would require for an account with real funds configured in the server. + +## Run + +Clone the repo, and run the development server: + +```bash +yarn dev +``` + +The app will open at [http://localhost:3000](http://localhost:3000). + + +## Configuration + +The app needs the following environment variables: + +``` + NEXT_PUBLIC_RPC_API_DEVNET = Url of your preferred devnet RPC + NEXT_PUBLIC_RPC_API_MAINNET = Url of your preferred mainnet RPC + NEXT_PUBLIC_DATABASE_URL = Url of your mongodb cluster (for data persistance) +``` + +Then additionally, if you want to configure the app to manage certain tokens by default, you need to configure them in the [config file](fontana.config.ts) and add the corresponding environment variables. + +``` +const config: Config[] = [ + { + keypair: "WALLET_1", + owner: "Token owner public account", + token: "Token mint account", + network: "Devnet" or "Mainnet", + } +]; +``` + +Which will require for a new environment variable `NEXT_PUBLIC_WALLET_1` corresponding to the `WALLET_1` keypair. + +``` + NEXT_PUBLIC_WALLET_1 = [Private key for token owner account] +``` + +You will need to add as many new environment variables as wallet ids are used in your configuration file. + +## License + +[Apache 2.0](./LICENSE) © [Boxfish Studio] + + +[Boxfish Studio]: https://boxfish.studio + diff --git a/doc/img/boxfish-logo-small.png b/doc/img/boxfish-logo-small.png new file mode 100644 index 0000000..cad9c1f Binary files /dev/null and b/doc/img/boxfish-logo-small.png differ diff --git a/doc/img/gh-splash.png b/doc/img/gh-splash.png new file mode 100644 index 0000000..2dd53d3 Binary files /dev/null and b/doc/img/gh-splash.png differ