This repository has no description
1# The Takes Project
2
3<img src="https://raw.githubusercontent.com/taciturnaxolotl/takes/main/.github/images/smokie.svg" height="175" align="right" alt="smokie the bear">
4
5> ### More deets coming soon 👀 🏔️ 📹
6> A slack bot that tracks takes and accepts uploads; developed with 💖 @ [Hack Club](https://github.com/hackclub)
7>
8> ⚠️ **Highly opinionated slack bot warning** - Project rapidly iterating
9
10## 🚧 Dev
11
12You can launch the bot locally with bun
13
14```bash
15bun install
16bun dev
17```
18
19you will also need to launch an ngrok tunnel and update your dev slack manifest to point to the ngrok tunnel
20
21```bash
22bun ngrok
23```
24
25you also need to create a `.env` file with the following keys
26
27```bash
28SLACK_BOT_TOKEN="xoxb-xxxxx-xxxxx-xxxxx-xxxxx"
29SLACK_SIGNING_SECRET="xxxxx"
30SLACK_SPAM_CHANNEL="C069N64PW4A"
31SLACK_LOG_CHANNEL="C08KX2YNN87"
32SLACK_REVIEW_CHANNEL="C07P0CXT08H"
33SLACK_LISTEN_CHANNEL="C08NEE6FVJT"
34NODE_ENV="dev"
35SLACK_USER_TOKEN="xoxp-xxxxx-xxxxx-xxxxx-xxxxx"
36API_URL="https://casual-renewing-reptile.ngrok-free.app"
37SENTRY_DSN="https://xxxxxx@xxxxxx.ingest.us.sentry.io/xxxx"
38DATABASE_URL="postgres://username:password@host:5432/smokie"
39CDN_TOKEN="cdn_token"
40```
41
42## 🔌 API Docs
43
44all endpoints are prefixed with `/api` and return JSON unless specified otherwise
45
46```
47GET /api/video?media=<url>
48```
49returns an HTML page with a video player for the given media URL
50
51```
52GET /api/recentTakes?user=<userId>
53```
54returns recent takes, optionally filtered by user ID
55- if user not found, returns `404` with an empty takes array
56- returns up to 40 takes ordered by creation date (newest first)
57- includes project info and total time stats
58
59```
60GET /api/projects?user=<userId>
61```
62returns project info
63- with user param: returns a single project for that user
64- without user param: returns all projects
65- returns empty array if no projects found
66
67typical take object looks like:
68```ts
69{
70 id: string;
71 userId: string;
72 notes: string;
73 createdAt: Date;
74 mediaUrls: string[];
75 elapsedTime: number; // seconds
76 project: string;
77 totalTakesTime: number; // seconds
78}
79```
80
81## 📜 License
82
83The code is licensed under `AGPL 3.0`! That means AGPL 3.0 requires publishing source code changes when the software is used over a network, guaranteeing that users can access the code. All artwork and images are copyright reserved but may be used with proper attribution to the authors.
84
85<p align="center">
86 <img src="https://raw.githubusercontent.com/taciturnaxolotl/carriage/master/.github/images/line-break.svg" />
87</p>
88
89<p align="center">
90 <i><code>© 2025-present <a href="https://github.com/taciturnaxolotl">Kieran Klukas</a></code></i>
91</p>
92
93<p align="center">
94 <a href="https://github.com/taciturnaxolotl/takes/blob/master/LICENSE.md"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
95</p>