Giter Site home page Giter Site logo

dijidaro / dijidaro Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 200 KB

Kenya's open source learning and revision repository for students, educators and parents.

Home Page: https://dijidaro.co.ke

License: MIT License

Python 48.23% CSS 10.38% HTML 39.42% Dockerfile 0.82% Procfile 0.05% Mako 1.09%
education educators flask learners postgresql python

dijidaro's Introduction

dijidaro

Kenya's only open source learning and revision repository for students, educators and parents.

dijidaro's People

Contributors

owokosteve avatar

Stargazers

 avatar

Watchers

 avatar

dijidaro's Issues

[FEATURE]: Display Revision Materials by Subjects and Sort by Recently Uploaded

To-Do List: Display Revision Materials by Subjects and Sort by Recently Uploaded

Database Structure

  • Create a table from the dijidaro PostgreSQL database. Table name is revision_materials.
  • It must have columns with relevant information including "title", "name", "subject", "upload_date".

**Database Retrieval"

  • Create a backend route in Flask to fetch revision materials based on subjects and sort by the most recently uploaded materials
  • Write a query to retrieve the data use the GROUP BY to group by "subject name" and use the ORDER BY clause to sort by "upload_date" in descending order.

API Endpoint:

  • Implement an API endpoint that returns the fetched data in JSON format.

Frontend Integration:

  • Make an API call to the endpoint using JavaScript's fetch or AJAX to retrieve the data.

Displaying the Data:

  • Loop through the JSON data in the frontend and dynamically create HTML elements to display revision materials under each subject.
  • Sort the materials under each subject based on the most recently uploaded materials.

Frontend HTML:

  • Add a container with the id "revision-materials-container" in your HTML file to hold the displayed materials.

Testing:

  • Conduct thorough testing to ensure the materials are displayed correctly by subjects and sorted by the most recent uploads.

Documentation:

  • Update the project's README with relevant information about this implemented feature.

Error Handling and Validation:

  • Implement proper error handling and data validation in both the backend and frontend code.

Code Review:

  • Request code review from team members to ensure code quality and best practices.

Update Issues:

  • Update any related issues or pull requests to reflect the progress made on this task.

Create a Pull Request:

  • Once everything is complete and tested, create a pull request to merge this feature into the main branch.

Celebrate! ๐ŸŽ‰

  • Congratulations! You have successfully implemented the feature to display revision materials by subjects and sorted them by the most recent uploads on the home section!

[FEATURE]: Display Recent Revision Materials

Display recent revision materials

  1. Database structure:
    • Create a table in PostgreSQL to store information about the revision materials.
    • Include relevant columns. Must include title, description and upload_date.
  2. Data retrieval:
    • Set up a flask route to fetch the most recent revision materials from the database.
    • Write a query to retrieve the data sorted by 'upload_date' in descending order.
  3. API Endpoint:
    • Create an API endpoint that returns the fetched data in JSON format.
  4. Front-end Integration
    • Make an API call to the endpoint using JavaScript fetch or AJAX to retrieve the data.
  5. Display the data:
    • Loop through the JSON data and dynamically create HTML element to display the most recent materials.
    • Add a container with id = "recent-materials" in the html file to hold recent materials
    • Apply CSS style accordingly.
  6. Testing:
    • Test the functionality to ensure it correctly displays the most recent materials.
  7. Documentation:
    • Update the project's README with relevant information about the implemented feature.
  8. Error Handling and Validation (Optional):
    • Implement proper error handling and data validation for back-end and front-end.
  9. Deployment (Optional):
    • Deploy the updated feature to Heroku
  10. Code Reviews:
    • Request code review from team members to ensure code quality and best practices.
  11. Update Issues:
    • Update any related issues or pull requests to reflect the progress made on this task.
  12. **Create a Pull Request: **
    • Once everything is completed and tested, create a pull request to merge this feature to the main branch.
  13. Celebrate! ๐ŸŽ‰
    • Congratulations! You have successfully implemented the most recent revision materials on the home section.

[FEATURE]: User Authentication Implementation

Description

This issues is dedicated to implementing user authentication functionality in our learning and revision materials repository. The objective is to ensure secure access and personalized features for users, including students, educators and parents.

Use Case

  1. Set up user registration and login functionality.
  2. Implement password hashing and encryption to ensure secure storage of user credentials.
  3. Design and create a user database schema to store user information securely.
  4. Develop user authentication APIs for validating user credentials and generating access tokens.
  5. Create user roles and permissions to differentiate between students, educators, and parents.
  6. Implement password recovery/reset functionality to assist users who forget their passwords.
  7. Integrate authentication with social media accounts (optional).

Proposed Solution

  • Use industry best practices for user authentication and security.
  • Implement validation checks for user input during registration and login processes.
  • Ensure secure session management and protection against common vulnerabilities (e.g., Cross-Site Scripting, Cross-Site Request Forgery).
  • Create appropriate error handling and informative error messages for users.
  • Test and verify the authentication flow across different scenarios and user roles.

Alternatives Considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[FEATURE REQUEST]: Upload Resources

Description

This feature includes a secure web form that users will be required to populate the fields with textual data, choose the resource they want to upload in PDF format. The form should validate if the user data matches the uploaded PDF resource.

Use Case

This feature will enable users from different schools to upload the resources i.e revision materials for sharing with others. Upon a successful upload, the resource will be saved to a database storage where by it can be accessed with other users at a later time.

Proposed Solution

To-Do List/Issue: Implement PDF Upload with Content Validation

Description:
This issue involves implementing a feature in our project that allows users to upload PDF resources. We will validate the contents of the first page of the PDF against user-provided form data (school name, subject, year, term, etc.) before saving the data in our database. Below are the steps and tasks required for this feature:

Tasks

File Upload Feature:

  • Implement a file upload feature that allows users to select and upload PDF files.

User Form Data:

  • Create a user form where users can provide metadata about the uploaded resource, including school name, subject, year, term, and other relevant information.

PDF Content Extraction:

  • Utilize a PDF library in the backend to extract the contents of the first page from the uploaded PDF file. (e.g., PyPDF2 or pdf.js)

Data Validation:

  • Compare the extracted PDF content with the user-provided form data to ensure they match. Implement appropriate data validation techniques.

Database Storage:

  • If the PDF content matches the user-provided data, save the metadata (school name, subject, year, term) and the URL for the uploaded resource in our database.

File Storage:

  • Store the uploaded PDF file in a cloud storage service (e.g., Amazon S3, Google Cloud Storage) and save the URL or key for the stored file in our database.

Response to User:

  • Provide feedback to the user about the successful upload or any errors encountered during the validation process.

Security Considerations:

  • Implement security measures to protect against malicious uploads and ensure the uploaded PDFs do not contain harmful content.

Logging and Monitoring:

  • Implement logging and monitoring to keep track of the uploaded files, validation results, and system activities related to this feature.

Testing:
- [ ] Thoroughly test the upload and validation process to ensure it works correctly and handles edge cases.

Documentation:
- [ ] Update our project's documentation to include instructions for users on how to upload resources and any validation requirements.

Deployment:
- [ ] Deploy the updated application to our hosting environment or server.

User Feedback:
- [ ] Gather user feedback and make any necessary improvements based on user experiences and suggestions.

This feature will enhance our platform by ensuring that only valid and relevant materials are shared within our learning and revision repository web app. Let's work together to implement it effectively.

Alternatives Considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.