add proper readmes

This commit is contained in:
Tanner Sommers 2024-08-02 16:28:48 -05:00
parent a585dd9bff
commit 402ffd89a3
2 changed files with 75 additions and 24 deletions

56
DEVELOPERS.md Normal file
View File

@ -0,0 +1,56 @@
# FanslySync Developer Documentation
Welcome. We'll tell you how to integrate with FanslySync.
## Our JSON Schema
FanslySync uses a JSON schema to sync data with 3rd party services. Here's an example of the JSON schema:
```json
{
"followers": [{ "followerId": "123456" }],
"subscribers": [
// An array of subscriber objects. See below for the schema.
]
}
```
### Subscriber Schema
```json
{
{
"id": "0", // The ID of the subscription, usually unique
"historyId": "<history_id>", // The ID of the subscription history
"subscriberId": "<user_id>", // The User ID of the subscriber
"subscriptionTierId": "<tier_id>", // The ID of the subscription tier
"subscriptionTierName": "<tier_name>", // The name of the subscription tier
"subscriptionTierColor": "#2699f7", // The color of the subscription tier
"planId": "0", // The ID of the subscription plan
"promoId": "0", // The ID of the promotion, if applicable
"giftCodeId": null, // The ID of the gift code, if applicable
"paymentMethodId": "0", // The ID of the payment method
"status": 3, // The status of the subscription. 3 = active, 4 = ?
"price": 7000, // The price of the subscription, in cents
"renewPrice": 7000, // The price of the subscription renewal, in cents
"renewCorrelationId": "673162822363914240", // The correlation ID of the renewal
"autoRenew": 1, // Whether the subscription is set to auto-renew
"billingCycle": 30, // The billing cycle of the subscription, in days
"duration": 30, // The duration of the subscription, in days
"renewDate": 1721988883000, // The date the subscription will renew (UNIX timestamp)
"version": 3, // The version of the subscription schema from fansly
"createdAt": 1721988883000, // The date the subscription was created (UNIX timestamp)
"updatedAt": 1721988883000, // The date the subscription was last updated (UNIX timestamp)
"endsAt": 1724667283000, // The date the subscription will end (UNIX timestamp)
"promoPrice": null, // The price of the subscription with the promotion, in cents
"promoDuration": null, // The duration of the subscription with the promotion, in days
"promoStatus": null, // The status of the promotion
"promoStartsAt": null, // The date the promotion starts (UNIX timestamp)
"promoEndsAt": null // The date the promotion ends (UNIX timestamp)
},
}
```
# Closing
That's it! If you have any questions, feel free to reach out to us at our [support email](mailto:tanner@fanslycreatorbot.com) if you have any questions. We're happy to help you integrate with FanslySync.

View File

@ -1,38 +1,33 @@
# create-svelte
<div align="center">
<h1>FanslySync</h1>
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
A simple tool to sync your fansly data with 3rd party services, securely.
## Creating a project
</div>
If you're seeing this, you've probably already done this step. Congrats!
## About
```bash
# create a new project in the current directory
npm create svelte@latest
FanslySync was created for the [Fansly Creator Bot](https://fanslycreatorbot.com) project to securely sync Fansly data with our service and others. We wanted to create a tool that would allow creators to sync their data with our service without having to give us their Fansly credentials. This tool is open source and can be used by anyone to sync their Fansly data with any service they want -- not just ours.
# create a new project in my-app
npm create svelte@latest my-app
```
## How it works
## Developing
We use your Fansly API key to sync your data with our service. This way, you don't have to give us your Fansly credentials. While it does provide the same access to your data as your credentials would, it's a more secure way to sync your data. **Your API key is never stored outside of your own computer.**
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
## Getting Started & Installation
```bash
npm run dev
We have a documentation page that explains how to get started with FanslySync. You can find it [here](https://docs.fanslycreatorbot.com/docs/for-creators/sync).
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
If you aren't using Fansly Creator Bot, you can ignore the parts about setting up the bot and just follow the FanslySync installation instructions.
## Building
To create a production version of your app:
## License
```bash
npm run build
```
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
You can preview the production build with `npm run preview`.
## Contributing
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
Contributions are welcome! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) file for more information.
## For Developers
If you are a 3rd party service that wants to integrate with FanslySync, please read our [DEVELOPERS.md](DEVELOPERS.md) file for more information.