You are browsing as a guest. Sign up (or log in) to start making projects!

MacForms

  • 4 Devlogs
  • 12 Total hours

MacForms is a simple and easy to use form creation tool with a ton of cool features and customization!

Open comments for this post

2h 41m 24s logged

Form responses

  • Added an actual public facing form submission page where anyone (regardless of whether or not they’re logged in) can fill out a form and submit their response :thumbs-up:
  • On the response submission page, you can see the form’s title, description, creation date, all the questions and their choices/inputs rendered correctly, a submit button that submits your response, and a clear button that will clear everything you filled in after showing a confirmation modal
  • If you haven’t filled out all the required fields before submitting, it shows a helpful warning message that tells you to fill out the options
  • You can deselect your choice for a multiple choice question if it’s not required by clicking on the same choice again (but this isn’t allowed for required questions because duh :dumbass: )
  • Public/private forms aren’t implemented yet so the moment you create a form it’s respondable by anyone :heavysob:
  • Once you submit your response, a response confirmation page will display confirming your submission, and it also shows an edit response option, as well as a submit another response option
  • Response editing works by adding a search param with your response id after the form page path, so it dynamically fetches your response data and fills it in automatically
  • The submit another response option just refreshes the page to create a new blank response state object
  • Added a different layout for the form submission page (since nav and footer aren’t needed), so I had to reorganize the routes and folders into logical groups to make different layouts work
  • Added schema and types for response data
  • Updated styling and navigation
1
0
4
Open comments for this post

3h 1m 13s logged

Form submission & auth

  • Finally added backend form submission so when you click on save on the form creation page after filling in all the values, it gets created and added to the database
  • When you click on save, MacForms validates all your new form’s values (title, description, etc.), as well as each question’s choices to make sure everything’s filled out properly
  • If you’re missing fields or something isn’t validated, a helpful error message will appear telling you what to fix :thumbs-up:
  • Once you successfully submit the new form, you get redirected to the form editing page where you will be able to edit it, change its settings, check the preview, and publish it (the page isn’t implemented yet)
  • You can also delete options/choices for multiple choice questions, as long as there’s at least one available choice
  • If you’re logged in, you can see your profile icon displayed on the right of the nav bar, and clicking on it opens a menu where you can view your account profile (redirects you back to MacWeb), toggle light/dark mode (doesn’t work yet), and log out
  • I spent a ton of time trying to debug and make the log out thing work because of this entire cross subdomain auth thing that just makes everything super complicated and frustrating, but I figured it out and fixed it by changing a few auth configs
  • Designed and added the MacForms logo (just a list icon on a green background) to the nav bar and the site favicon. The design is pretty terrible, hopefully I’ll come up with a better design :heavysob:
  • Also spent a lot of time testing to ensure the app, especially auth, works both locally in dev environment and in production
  • Added a helper function to fetch form data from Prisma, destructure and sanitize the data, and do some conditional typing to match the types and ensure type safety
  • Updated README to be more informative on dev setup since there’s quite a few steps for setup and I don’t wanna forget them in the future
  • Updated schema and types
1
0
15
Open comments for this post

5h 10m 49s logged

Form creation & homepage

  • I forgot to add devlogs for a couple days, so this devlog will be a bit long and cover a ton of changes
  • Added a basic homepage with a hero that has a title, description, and some call to action buttons, and a few sections that are just placeholder text and images for now to fill the layout
  • Added a navigation bar at the top with links to a few pages and an interactive search bar that doesn’t actually work yet (since there’s nothing to search)
  • Copied the MacWeb footer and changed some links and styling to add the footer
  • Auth isn’t completely set up yet, so a few things aren’t being displayed properly. Even if you’re not logged in, you can still access the form creation page, it just doesn’t do anything yet :dumbass:
  • On the form creation page (that is a form itself), you can fill in the form’s name, description, visibility (making it private requires an access code, which you can generate or type in manually), and whether it’s accepting responses
  • You can add new questions by clicking on the add question card, which shows a new question where you can select its type (only multiple and text are supported right now), set the question and description, set it as required/optional, and add answer choices or set the input placeholder depending on the question type
  • The backend for making and publishing forms isn’t set up yet, so it’s only the frontend that doesn’t actually do anything :pf:
  • Adding types for the form, questions, and answer choices was a huge pain because I had to set up a type map, extract its keys, and use them to dynamically construct type unions and some other advanced :ts: stuff for :ts: to dynamically infer option types based on the question type, and it was a huge headache to figure out
  • Updated Prisma schema and added other types
  • Updated styling and navigation
0
0
3
Open comments for this post

1h 20m 54s logged

MacForms: simple but customizable form creation tool

  • I’m building MacForms, an easy to use form creation tool with a lot of features and customization! This is actually a subapp of my online platform MacWeb with many different apps you can try out :thumbs-up:
  • I started this app because I have to make a form for a few people to fill out, and instead of using Google Forms or Notion like a weirdo, I decided to make my own form tool and use it to make the form like a totally normal person
  • Since this is a subapp of the main platform, it shares the same auth and database system with the other apps, so I had to update and migrate a ton of stuff on the root domain before I could start working on this app :crine:
  • The auth system was also challenging to configure properly, but I figured out how to share cookie sessions across subdomains for my account system after a few hours of painful debugging
  • After the root domain was migrated and updated properly, I could finally start working on MacForms and set up the project and its dependencies
  • Currently there isn’t much since auth took so much time to work, but the hardest part is finished, so hopefully the rest of development will be smoother
  • Also set up some DNS and Vercel records for the real domain to work
0
0
17

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…