README
To insert the OpenAI key, do bin/rails credentials:edit and insert:
openai:
access_token: <ACCESS_TOKEN>
Then: bin/setup.
Goal
You’ll build a Rails application named “AI Email Writer” to assist users in drafting effective cold emails.
The home page will prompt users to input the following details:
- [x] The purpose of the email
- [x] Recipient information
- [x] Sender information
- [x] Any relevant parameters for the email (e.g., reading time, language, tone, etc.)
In response, the application should generate and return a tailored cold email draft that aligns with the provided criteria, including a subject line and body content.
The application will also maintain a history of previously generated emails, allowing users to view and reference past drafts directly within the interface.
Guidance
- [x] Authentication, account creation, and session management are not required.
- [x] You can use any storage solution (e.g., in-memory, file-based, or database-backed).
- [x] We have intentionally left out specific technical or design guidelines. Follow the mantra: “Make it work, make it right, make it fast.”
- [x] We have provided an OpenAI API key via email, enabling interaction with any OpenAI model through their API. However, you can use alternative platforms or tools if they better suit your approach.
Output
You are expected to share the code of a functional Rails application, which can run on any computer (e.g., bin/rails db:migrate and bin/rails server should suffice; we’re also fine with Docker compose or similar).
A zip file or a link to a GitHub repository both work.
In addition to the files, any textual or visual material can be embedded in your repository to help us assess your work. Do not hesitate to justify your choices, suggest tracks for improvements, explain the roadblocks you might have encountered, etc.