How to Add a Question to Choiceof.dev

Feb 25, 2024 | Programming

Welcome, developers! Are you ready to dive into the world of funny choices and creative contributions? Choiceof.dev is a platform built by developers, for developers, presenting not just a challenge but also a fun way to engage with the coding community. In this guide, we will walk you through the steps needed to add your own question to this hilarious repository. Let’s get started!

Step 1: Clone the Repository

To begin your journey of contribution, you first need to clone the project repository to your local machine. This is akin to getting a blank canvas before starting your masterpiece. Use the terminal and run the following command:

git clone [repository-url]

Step 2: Build the Project

Once you have the project on your machine, it’s time to build it, which is like preparing your tools before you start painting. Execute:

pnpm install

This will install all necessary dependencies for the project to run smoothly.

Step 3: Adding Your Question

Now that the foundation is set, it’s time to sprinkle in some humor! To add your question, navigate to the apps/dev/choices-next/public/assets/data/questions.ts file. You will see a list of pre-existing questions. Just like adding new ingredients to a recipe, you can add your question at the end or in between the existing ones.

Remember, your questions should be funny! If your question lacks humor, try to enhance it with amusing images.

Step 4: Include Your Images

Once your question is ready, you need to include two images that correspond with it. Place them in the folder apps/dev/choices-next/public/assets/img using the names you specified in the questions file. Think of this as choosing the right toppings for your pizza; they must complement your dish!

Step 5: Test Your Question

Now it’s time to see what your creative prowess has produced! Start the project locally:

npx nx serve

Open your browser and head over to localhost:4200/question/your-slug to see your question in action. This is just like presenting your artwork to an audience for the first time—exciting and nerve-wracking!

Step 6: Preview for Social Networks

If you’re thrilled with your question, generate its preview for social media using:

pnpm ts-node scripts/preview-generator.ts

If you’ve made multiple changes and want to regenerate all previews, you can run:

pnpm ts-node scripts/preview-generator.ts --override

Step 7: Submit Your PR!

Once everything is polished and ready, submit your Pull Request (PR). The team will review your contribution, and if it brings a smile, it will be merged into the project, adding your humor to the choice of decisions!

Troubleshooting Tips

If you encounter any issues during your journey, here are some troubleshooting ideas:

  • Double-check your question formatting—ensure you followed the existing structure.
  • Ensure your images are in the correct folder and named accurately.
  • Make sure all dependencies were installed correctly by running pnpm install again.
  • For any lingering issues, run the project and check for errors in the console.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Contributing to the Core Project

In addition to adding questions, you might want to contribute features or fixes. Have a look at the open tickets in the repository. Pick one that piques your interest and propose your solution via a PR. If you discover a bug or have an idea, feel free to create your own issue!

Technologies Used

This project is a modernized adaptation of its little sibling choixdemerde.fr. It leverages several cutting-edge technologies:

Community plugins can also be added from the Nx community.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Now, gather your creativity and tech skills, and let’s make the world of choices a little more amusing!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox