Skip to content

Commit

Permalink
Add LICENSE and Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-cafecito committed Dec 4, 2024
1 parent 4b9b0df commit 93088a1
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 35 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
78 changes: 43 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -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!
# 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.

0 comments on commit 93088a1

Please sign in to comment.