Giter Site home page Giter Site logo

alog's Introduction

ALog

Installation

Download ALog on the App Store

Building the project

Follow these steps to build the project:

1. Clone the repo

git clone https://github.com/duxins/alog

2. Install xcodegen

brew install xcodegen

3. Install Ruby gems

bundle install

4. Copy .env.example to .env

To setup up the environment variables, copy the .env.example file and rename it as .env.

cp .env.example .env

Update the keys as needed within the .env file.

5. Generate the Arkana package

bundle exec bin/arkana

6. Generate the project

Finally, generate the project by running:

xcodegen

Once you've followed these steps, you should have a fully built project ready for development. If you encounter any issues, please open an issue in the repository.

Deploying server-side code to Cloudflare

Steps:

1. Create a new Cloudflare worker

  • Once logged in, navigate to the "Workers & Pages" section.
  • Click on "Create Application" → "Create Worker".
  • Rename the Worker as per your requirements.
  • Click on "Deploy".

2. Configure your worker

  • After deploying, you'll see a "Quick Edit" button. Click on it.
  • Paste the contents of Server/src/worker.js into the Cloudflare Worker editor.
  • Click on "Save and deploy"

3. Set Environment variables:

  • On the Worker's Settings tab, navigate to the Variables section.
  • Set the following variables:
Variable Description
OPENAI_KEY Required Your OpenAI API key.
HMAC_KEY Optional This should be consistent with the key used on the client side. If this variable is not set, HMAC validation will not be performed.
AI_MODEL Optional Represents the default model. If not set, the model specified by the client will be used.

4. Update API base URL

  • Open Constants.swift file.
  • Update the api_base_url constant to point to the URL of your deployed Cloudflare Worker.
struct Constants {
    static let api_base_url = URL(string: "https://your-worker-name.workers.dev/")!
}

License

Distributed under the GNU General Public License v2.0. See LICENSE for more information.

Important Note: This open-source license does not prevent anyone from renaming and repackaging this app for distribution. However, doing so is in direct violation of App Store Review Guidelines, specifically Guideline 4.1 (Copycats) and Guideline 4.3 (Spam). Any attempt to simply rename and repackage this app for submission to the App Store is explicitly prohibited.

Credits

Thanks to @onenewbite for his inspiring video "为什么你应该开始用ChatGPT写日记|做笔记", which has greatly influenced this project.

alog's People

Contributors

duxins avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.