👋 Hi there! I'm Channing.
You can't improve what you don't measure
^that quote has proven particularly impactful in my professional life. This hobby project is my attempt to bring that wisdom into my personal life - by making it as frictionless as possible to record moments I want to measure, using one of the most accessible functions available: SMS.
Text-to-Record (T2R) lets you text a dedicated phone number with a message and, based on how it's formatted, store that message as a categorized record. The records appear in a simple timeline UI on the web, but you can do whatever you want with them - the data is stored in your own Hasura-wrapped Postgres database, for GraphQL-based or direct consumption via any other service you point at / link to.
The parsing logic is pretty basic (and specific to me), but feel free to fork this codebase and customize it as you'd like. Prereqs and setup instructions for self-hosting are detailed below.
🙋♂️ Feedback is welcome and appreciated! Please don't hesitate to open an issue or email me directly via [my github handle] at gmail. Contributions are also welcome - if you're interested, email me and I'll add more detail to the Contributing section.
This section explains (1) what's required to host a T2R instance yourself, and (2) how to set things up to make it all work - and extend it!
The following services must be set up for T2R to function.
Should be straightforward 🙂
You'll need a place to host your instance; I use Vercel. Once you've forked this repository, adding free Vercel hosting is as simple as:
- Add a new project from your Vercel dashboard
- Import the forked repository
- Copy the URL provided by Vercel - we'll use this later. It should look something like
the-name-i-chose.vercel.app
You'll need a Twilio account to use the core SMS functionality.
- Set up a Twilio account (or sign in, if you already have one)
- Set up a twilio phone number with "Messaging" configured - this guide was helpful for me
- Add a webhook for your hosted url at
/api/twilio-sms
(egthe-name-i-chose.vercel.app/api/twilio-sms
) via "Phone Numbers" > "Active numbers" > "Messaging" section > "A MESSAGE COMES IN" webhook using POST.
T2R uses Hasura for persistence. You'll need to:
- Set up your own Hasura Cloud project
- Connect a Postgres database following their instructions (I used their one-click-Heroku option)
- Update your schema to mirror this one
- Copy your Hasura (1) graphql URL & (2) secret
T2R uses NextAuth for authentication. For it to work, you'll need to:
- Add providers.
- Currently,
.env
and[...nextauth].js
support Google (instructions to add) and Github (instructions to add), but you can add any provider you want by updating those two files and adding from the supported list
- Currently,
- Create a nextauth secret via eg
$ openssl rand -base64 32
Prerequisites complete? We're ready to go! 🚀
First things first: copy the .env.sample
file to just .env
and update it with values from the Prerequisites section
Next, install dependencies via yarn install
All set! Run the app locally via yarn dev
Assuming you've connected your forked repo to Vercel, deployment is as simple as
- Ensure your env variables are set in Vercel
- Merge to your
main
branch, and Vercel should handle the rest!
Features to be added:
- [ ] Add README section for write-to-Notion functionality
- [ ] Add edit/delete functionality via the UI
- [ ] Extend parser to import & use a "rules config" for parsing logic
- [ ] Update parser to consume config
- [ ] Add config editor to UI
- [ ] Migrate to TypeScript
- [ ] Add user-configurable record types
- [ ] Add user-configurable record theming for record types
- [ ] Add filter on record list
- [ ] Add condensed timeline view to quickly, visually comprehend habits over time
If you're interested in contributing, I'd love your help! Just send a message to [my github handle] at gmail and I'll set up a contribution process.