The Writing Prompt Generator prints out a random prompt from a list when the user loads the website. The system also allows users to enter and save work for prompts, so they can come back and complete later.
Users are presented with an option: journal prompt, fiction prompt, and research prompt. The user can click on any of the option buttons to receive a prompt in those categories. If the user wants to add a prompt, they can select the “Add New Prompt” button and add the prompt in the text box, and tag accordingly.
If a user finds a prompt they want to work with, they can click the “Write This Prompt” button which will take them to the prompt fill page. This is the page where the user can write for the prompt, save their work, and if they come back later they can edit existing work that has been written for the prompt.
Once a prompt has been completed, the user can select the “Mark As Complete” button and the prompt status will change to Completed and the prompt will be removed from the list that the user receives prompts from.
My objective with this project was clear: I wanted to create something that I would use regularly in my own life. A personal hobby of mine is creative writing – anything from creative fiction to journaling, to research and essays. For the longest time, I’ve kept slips of paper with ideas jotted down on them in a small jar and I would choose something out of there to get myself started. When I started the Web Development program, I was rarely home when I had free time on account of spending long days on campus, which meant I never had the slips of paper with me when I had any free time to do some writing.
When I started this project in the fall, I started out with just HTML/CSS and vanilla JavaScrip. I stored all of the prompts I wanted in an array and an onclick event to print out a random prompt. It worked for what I needed, however, I knew I wanted to be able to do more with the system. It was important to me to be able to add or remove prompts without ever touching the code.
As I began learning PHP, I saw that I could do this easily. With a better understanding of how to meet my goals, I rebuilt the system using PHP, holding all of my prompt information in a database and creating CRUD functions in order to add, remove, and update a prompt. I also realized I could store in-progress work in this system, so I could begin working on a prompt and if I did not have an opportunity to finish, I could save my work and come back to it. I added another column to my prompts table, adding ‘prompt_fill’ which held the work.
I also realized I could implement a tagging system, to organize content and specific features. I created another table in my database for tags and added a foreign key to my prompts table to connect each prompt to a tag using tag_id.