From 93088a124bfcf1070cbc76bc64c69c4f0e986188 Mon Sep 17 00:00:00 2001 From: Bert Cafecito <189543060+bert-cafecito@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:15:58 -0500 Subject: [PATCH] Add LICENSE and Update README --- LICENSE | 21 +++++++++++++++ README.md | 78 ++++++++++++++++++++++++++++++------------------------- 2 files changed, 64 insertions(+), 35 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8586e28 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Bert Cafecito + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 23ffb0c..ee258e1 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,43 @@ -Trivia App -What I Built -I built a Trivia App that allows users to answer multiple-choice trivia questions. The app features a backend built with FastAPI and a frontend using HTML, CSS, and JavaScript. The backend serves trivia questions and handles user answers, while the frontend provides an interactive interface for users to engage with the trivia questions. - -Key Features -Multiple-Choice Trivia Questions: Users can answer multiple-choice trivia questions fetched from the backend. -Answer Validation: The app checks if the user's answer is correct and provides immediate feedback. -Session Management: The app tracks the user's session data, including the number of questions answered and streaks of correct and incorrect answers. -Achievements and Badges: Users can earn achievements and badges based on their performance. -Profile View: Users can view their profile, including their streaks, answered questions, achievements, and badges. -Responsive Design: The frontend is designed to be responsive and user-friendly. -How I Used DevCycle -I integrated DevCycle into the Trivia App to manage feature flags and remote configuration. This allowed me to: - -Roll Out Features Gradually: I used feature flags to roll out new features to a subset of users, ensuring stability and gathering feedback before a full release. -A/B Testing: I conducted A/B testing to compare different versions of features and determine which version provided a better user experience. -Remote Configuration: I used DevCycle's remote configuration to change app behavior and content without deploying new code, making it easier to manage and update the app. -How to Run -Backend: - -Navigate to the backend directory. -Build and run the Docker container: -Frontend: - -Open index.html in a web browser. -API Endpoints -Fetch Trivia Question: GET /trivia -Check Answer: POST /trivia/answer -Get Player Profile: GET /whoami -Check Achievements: GET /checkachievement -Technologies Used -Backend: FastAPI, Python, Docker -Frontend: HTML, CSS, JavaScript, Bootstrap -Feature Management: DevCycle -Enjoy playing and testing your trivia knowledge! \ No newline at end of file +# DevCycle Feature Flag Challenge DEV Challenge + +DevCycle Feature Flag Challenge DEV Challenges is a project about building an app that showcases the most unique, creative, or fun way to use feature flags in an application by leveraging a [DevCycle SDK][1], [OpenFeature Provider][2] or [the API][2]! + +[1]: https://docs.devcycle.com/sdk/ +[2]: https://docs.devcycle.com/integrations/openfeature +[3]: https://docs.devcycle.com/management-api/ + +## What are DEV Challenges? + +DEV Challenges are like miniature Hackathons, and provide a fun opportunity for you to build up experience using new tools or to publicly show off your best skills to the community, potential employers and more. You can find more information about DEV Challenges [here](https://dev.to/challenges). + +## What I Built + +The app that I built for this challenge is a Trivia App that allows users to answer multiple-choice trivia questions. The app features a backend built with FastAPI and a frontend using HTML, CSS, and JavaScript. The backend serves trivia questions and handles user answers, while the frontend provides an interactive interface for users to engage with the trivia questions. + +### Features Flag + +- Time Limit - A question must be answered within a given time limit. Based on the user's difficulty level, the time limit is adjusted. +- Difficuliy - When a user answers a question correctly, they add to their answer streak. Based on the user's streak, the app adjusts the difficulty of the questions. +- Score Multiplier - When a user answers a question correctly, they earn points. The score multiplier feature allows users to earn more points for answering questions within the given time limit. + +## My DevCycle Experience + +Integrating DevCycle into my app was an insightful experience. Initially, understanding how to effectively use feature flags was challenging. Feature flags allow you to enable or disable features without deploying new code, which is powerful but requires a good grasp of the system. + +One of the key challenges was learning and understanding how to properly set up a feature with the DevCycle platform. After a few attempts, I was able to gain a better understanding of how to create and manage features using the DevCycle platform. I accomplished this by setting up variations for variables on features to create a more dynamic experience for users. + +Another key challenge was learning how to use user targeting to personalize the experience for different users. By leveraging DevCycle's user targeting capabilities, I was able to create a more dynamic and engaging trivia experience. Here's how I accomplished this: + +- **Feature Flag Evaluation**: I used targeting rules based on custom properties that I set up for the project. This enabled me to present different variables for each feature based on the user's progress in the trivia game. + +- **Dynamic Adjustments**: Based on the feature flag values, I adjusted the trivia questions' difficulty and time limits to create a personalized experience for each user. This made the app more engaging and challenging for users with different skill levels. + +Overall, using DevCycle's feature flags evaluation and user targeting capabilities allowed me to create a more personalized and dynamic trivia app, enhancing the user experience. + +## Suggestions for Improving DevCycle + +Based on my experience, here are a few suggestions for improving DevCycle: + +- **Enhanced Documentation**: Providing more detailed documentation and examples on setting up and managing feature flags would help new users get up to speed more quickly. + +By addressing these areas, DevCycle can further enhance its platform and provide an even better experience for its users. \ No newline at end of file