Deno Code Examples Showcase
I decided to share some examples based off of production Deno projects I've written.
tl;dr; You can see the working app. You can also see the repo with the source code.
What's in it?
It has a lot of things that modern web applications need to do these days, like:
- A database connection/interface, with support for migrations (it uses PostgreSQL);
- A cronjob runner interface, with a locking mechanism (via Redis);
- A simple caching service, using
cachesbut falling back to in-memory where it's not yet supported (like Deno Deploy);
- Authentication via Google and GitHub, with persistent secure-cookie-based sessions;
- Form submission with dynamic UI changes on field changes;
- Adding text to PDFs;
- Saving files (PDFs) to AWS S3;
- Sending emails (via Postmark) with attachments;
CSStranspiling for the browser/clients without bundling;
- TailwindCSS for quicker context-sharing with other front-end engineers or designers;
- GitHub Actions for CI, including tests.
There are a few more things like proper responsive, mobile-first design and considerate UX (show a success notification with an indicator to what's new; show a clear error and don't clear out the form; properly visually identify invalid form fields, etc.), but the ones above already compose a big list.
It allows TypeScript by default, and it includes a formatter, linter, and test commands. You also can get so much done with so little boilerplate code!
Where is it?
You can find the running app here and the GitHub repo with the source code.
Where does the data go?
It's deleted every day.
I hope you enjoy it.
Thank you for your attention and kindness. I really appreciate it!