Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theovidal/cubcarre
🎲 Rubik's cube timer on a Telegram bot
https://github.com/theovidal/cubcarre
Last synced: about 2 months ago
JSON representation
🎲 Rubik's cube timer on a Telegram bot
- Host: GitHub
- URL: https://github.com/theovidal/cubcarre
- Owner: theovidal
- License: gpl-3.0
- Created: 2022-07-04T07:47:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-10T18:31:56.000Z (over 2 years ago)
- Last Synced: 2024-05-29T22:47:02.425Z (8 months ago)
- Language: JavaScript
- Size: 1.05 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 💻 Development
Thanks for participating in CubCarré's improvement and/or debugging! First, check the following requirements:
- Git, for version control
- Golang 1.18 or higher with go-modules for dependencies
- Node.js (tested on v14+) with npm or yarn for dependencies
- A SQLite database file (whatever location)Clone the project on your local machine:
```bash
git clone https://github.com/theovidal/cubcarre # HTTP
git clone [email protected]:theovidal/cubcarre # SSH
```### Telegram bot
The bot itself is a Go program that uses the [telegram-bot-api](https://github.com/go-telegram-bot-api/telegram-bot-api) library.
- Database models are located under the `database` directory
- Commands and callback actions are in `handlers`
- Some helpers can be found in `lib`Set up some environment variables described in the [.env.example file](./.env.example), either by adding them in the shell or by creating a .env file at the root of the project. To run and test the bot, simply use `go run .` in the working directory. To build an executable, use `go build .`.
### Web app
The web app associated with the bot is located under the [webapp folder](./webapp). It is written with [Svelte](https://svelte.dev) and built with [Vite](https://vitejs.dev). This combination ensures a light and instant experience to the user.
To start, go in the folder and install required dependencies :
```bash
npm i # Install the dependencies
yarn i
```While developing, you can run a local test server that you plug to the Telegram bot. You can either open your ports on your router, or use services such as [ngrok](https://ngrok.com/) that creates a tunnel to your machine.
```bash
npm run dev # Run the development server
yarn dev
```Once done, to build for production, use the script below and serve the output directory through a web server, like Apache or nginx. You can also deploy on GitHub Pages, Netlify....
```bash
npm run build # Build for production
yarn build
```## 📜 Credits
- Maintainer: [Théo Vidal](https://github.com/theovidal)
- Libraries: [check go.mod](./go.mod)## 🔐 License
[GNU GPL v3](./LICENSE)