Author: wbjuba8jii0b

  • docker-compress

    Compress

    Multi-platform Docker container with utilities to compress/decompress data (zip, gzip, 7zip, bzip2, lz4, xz…).

    Dockerfile Docker Build Docker Stars Docker Pulls Docker Version CII Best Practices OpenSSF Scorecard

    Example without using the filesystem

    Let’s say that you have a file foo.txt in your current working directory that you want to compress:

    Mac/Linux

    cat foo.txt | docker run --rm -i --net=none leplusorg/compress gzip -c - > foo.txt.gz

    Windows

    type foo.txt | docker run --rm -i --net=none leplusorg/compress gzip -c - > foo.txt.gz

    Example using the filesystem

    Same thing, assuming that you have a file foo.txt in your current working directory that you want to compress:

    Mac/Linux

    docker run --rm -t --user="$(id -u):$(id -g)" --net=none -v "$(pwd):/tmp" leplusorg/compress gzip /tmp/foo.txt

    Windows

    In cmd:

    docker run --rm -t --net=none -v "%cd%:/tmp" leplusorg/compress gzip /tmp/foo.txt

    In PowerShell:

    docker run --rm -t --net=none -v "${PWD}:/tmp" leplusorg/compress gzip /tmp/foo.txt

    Software Bill of Materials (SBOM)

    To get the SBOM for the latest image (in SPDX JSON format), use the following command:

    docker buildx imagetools inspect leplusorg/compress --format '{{ json (index .SBOM "linux/amd64").SPDX }}'

    Replace linux/amd64 by the desired platform (linux/amd64, linux/arm64 etc.).

    Sigstore

    Sigstore is trying to improve supply chain security by allowing you to verify the origin of an artifcat. You can verify that the jar that you use was actually produced by this repository. This means that if you verify the signature of the ristretto jar, you can trust the integrity of the whole supply chain from code source, to CI/CD build, to distribution on Maven Central or whever you got the jar from.

    You can use the following command to verify the latest image using its sigstore signature attestation:

    cosign verify leplusorg/compress --certificate-identity-regexp 'https://github\.com/leplusorg/docker-compress/\.github/workflows/.+' --certificate-oidc-issuer 'https://token.actions.githubusercontent.com'

    The output should look something like this:

    Verification for index.docker.io/leplusorg/xml:main --
    The following checks were performed on each of these signatures:
      - The cosign claims were validated
      - Existence of the claims in the transparency log was verified offline
      - The code-signing certificate was verified using trusted certificate authority certificates
    
    [{"critical":...
    

    For instructions on how to install cosign, please read this documentation.

    Request new tool

    Please use this link (GitHub account required) to request that a new tool be added to the image. I am always interested in adding new capabilities to these images.

    Visit original content creator repository https://github.com/leplusorg/docker-compress
  • family-friendly

    Family Friendly

    Mockup

    Visit the live Website : Family Friendly ➡️.

    Family Friendly is a community based application where families can get together and have fun. This project promotes togetherness, fun and community through activities.
    It is difficult sometimes as new or experience parents to find the motivation to go out and do something with the hectic parenting life. You would have to organize something or think about going somewhere on top of preparing what you need to bring with you for your little one and for yourself. So you would consider doing nothing, stay put and deal with the craziness happening at home. A lot of different factors could amplify the sentiment.
    This can lead to inactivity, confinement and mental distress which only feed the vicious cycle.

    In order to help parents and/or caretaker, I propose Family Friendly.
    This platform will propose features including a list of events coming up, the possibility to create and join event and access to support that provide useful contacts and information. As well a forum that allow users to share tips and help each other in a format of Question and Answer.

    Table of Content

    Project

    Project Goals

    This project is offering an application with a welcoming and fun environment to enable and empower users to go out, join activities and events. Encourage users to meet with the community, have fun and share good memories. It promotes healthy lifestyle and mental health.

    Developer and Business Goals

    • Develop an interactive website with a server connection using HTML, CSS, JavaScript and Python.
    • Provide a user-friendly application.
    • Contribute to the community.
    • Help parents.
    • Promote Wellness and health through activities.
    • Help personal and family growth.

    User Goals

    • Easy to use application.
    • Getting clear information.
    • Quick access to Events.
    • Practical way to participate and be part of the community.

    🔙 Table of Content

    UX

    Audience definition

    1. The primary targeted audience is Families and more precisely Parents.
    2. The secondary targeted audience is Children.

    The primary audience for this application is looking for:

    • Getting together.
    • Going out and/or outside.
    • Having fun as a family.
    • Sharing parental tips/advise.
    • Supporting each other.
    • Socialization of the children.
    • Participating in a healthy community.

    The secondary audience for this application is looking for:

    • Having fun.
    • Discovering.
    • Meeting and Making friends.

    This application is the best way to answer their needs because:

    • Activities are created and proposed by users, for them and the community.
    • It provides the possibility to Create and Join Events.
    • Events are accessible in a click.
    • You can identify immediately if there is a suitable Event for you and your family.
    • You can Create and Join Events on the go.
    • It offers parenting tips and a space where parents can browse content relevant to them.
    • It is a User Centric Design approach:
      • It is a simple application to use.
      • It is very specific and get to the point.
      • The information are displayed in a fashion that is not overwhelming and easy to learn.

    User stories

    First time users

    As a first time user:

    1. I want the application to be easy to navigate and appealing.
    2. I want to find information in an obvious manner without having to look for it.
    3. I want to find events and identify instantly:
      • The type of activity.
      • The appropriate age to participate.
      • The location.
      • The date and time.
    4. I want to sign up and create a profile.
    5. I want to log in.
    6. I want to log out.
    7. I want to be able to join an event.
    8. I want to be provided with easy instructions on how to create an event.
    9. I want to be able to create an event.
    10. I want to have access to the support page where I can find:
      • Useful contacts.
      • Parenting advices.
      • A space where I can share ideas and/or ask questions and advices.

    Returning users

    As a returning user:

    1. I want to be able to cancel my participation in an event.
    2. I want to be able to cancel an event I created.
    3. I want to be able to modify an event I created.
    4. I want to be able to modify my profile.
    5. I want to be notified when there is a change on an event I am participating in.
    6. I want to be notified when people join or cancel an event I Created.
    7. I want to post a question or advice on the support page.
    8. I want to edit or delete a question or advice I created on the support page.
    9. I want to participate in topic on the support page.
    10. I want to propose a useful contact.

    🔙 Table of Content

    Design Choices

    Fonts

    Considering the targeted audience, the sans serif type of font is the more appropriate because it is most often associated with simplicity and straightforwardness.
    I will be using:

    • Pacifico for the name of the website (Family Friendly) only. It is a handwriting type of font which is very friendly and welcoming with its roundness and has something fun to it that relates to the website.

    • Lato and Nunito are used for the rest of the website. They both are sans serif fonts, and they work very well together. They are comforting, simple and easy to ready.

    Sans serif will be use as a fall back if the fonts do not load. It is common as the main typographies are sans serif type.

    Icons

    • Some Font Awesome icons will be part of the website for better UX.
    • The logo and favicon are the same image and use the color scheme of the website.

    logo

    Colors

    Color palette

    The colours chosen for the website are simple and joyful. They are based on the psychology behind colours (colour affects, London Image Institute). I used Adobe Color to create the colour scheme.

    • Yellow #E9F900 for Friendliness and Warmth.
    • Blue #0845FF for Confidence, Sincerity and Integrity.
    • Red #FF091E for cancelling and deleting functionality.
    • Orange #FF8401 for Creativity and Innovation.
    • Green #24C212 for Life, Growth and Nature.
    • The background will be off White #FAFAFA for simplicity and cleanliness.
    • Footer will be Grey #999999 for a nice contrast.

    Adobe Color was used to build the color compatibility and accessibility. The color scheme and swatches are said color-blind safe.

    Color accessibility

    Images

    The images will be the one uploaded by users for their profile.
    Those images are stored using base64 to encode the image and store it as a string in the user collection.

    Styling/Feeling

    The feel of the website is welcoming and simple to provide a quick access and learning process.
    It makes users comfortable and make them want to try!

    Audio/Video

    No audio or video will be integrated at the moment.

    🔙 Table of Content

    Wireframes

    Site map

    The following is part of the future features to implement.

    For the full version:

    🔙 Table of Content

    Different design

    Thinking on how usable and intuitive the carousel is to scroll thought Events, considering that it could be a lot of them, I have decided to implement collapsible to display all the events across the website.

    After considering deadline and features priority, I decided to leave the support section for future features to implement. I once heard that the project is never finished, we just run out of time!

    🔙 Table of Content

    Features

    To build this project, I use Flask framework with the Jinja templating language. For consistency across the website some features will be repeated and functionality will be kept as simple and direct as possible.

    Existing and Future Features are published in a separate file, please see FEATURES.md for full details.

    Flowchart

    Website flowchart Website flowchart pdf

    🔙 Table of Content

    Data

    All the data schemas have been saved in JSON files in app/static/js/data-schemas

    Most of the data is saved as a string and the format of the string is validated by pattern attribute in all the forms.

    Data Stories

    • For the website code production, two collections have been used in MongoDB:

      • users
      • events
    • The users collection is organised following the user data-schema as shown below:

      • user data schema sample
      • _id
        • Default field given automatically when creating a document in MongoDB. It is unique and allows to identify each document.
      • username
        • Field of string data-type that is used for users to personalized their profile. It must be unique.
        • This field is validated by checking its value against all username’s field value created in the user collection. As well a pattern attribute is used on the form’s input field.
      • first_name
        • Field of string data-type that is used for users to personalized their profile.
        • This field is validated with a pattern attribute on the form’s input field.
      • last_name
        • Field of string data-type that is used for users to personalized their profile.
        • This field is validated with a pattern attribute on the form’s input field.
      • email
        • Field of string data-type that is used for users to personalized their profile. It must be unique.
        • This field is validated by checking its value against all email’s field value created in the user collection. As well a pattern attribute is used on the form’s input field.
      • password
        • Field of string data-type that is used for security.
        • Before to be stored the password is hashed and salted using werkzeug security module of Flask. It is asked to enter the password twice and a validator is used to check if the passwords correspond to the regex pattern and that they are the same.
        • When the password is used/asked on the website, it is validated by checking the password in the input field against the password saved in the database using werkzeug security tools.
      • profile_picture
        • Field of string data-type that is used for profile personalization.
        • To store the image, I have used base64 to encode the image and store it as a string. The image is first downloaded, then encoded and stored and then delete so only the string saved in the database remains.
      • events_created
        • Field of array data-type that is used in order to know which events have been created by the user in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website.
      • events_joined
        • Field of array data-type that is used in order to know which events have been joined by the user in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website.
      • events_liked
        • Field of array data-type that is used in order to know which events have been liked by the user in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website. As well it could give information on the preferences off the user.
    • The events collection is organised following the user data-schema as shown below:

      • user data schema sample
      • _id
        • Default field given automatically when creating a document in MongoDB. It is unique and allows to identify each document.
      • event_category
        • Field of string data-type that is used for giving information on the category of the event.
        • It is validated by the select option of the form.
        • This can provide information on what type of event is preferred by users.
      • event_location
        • Field of string data-type that is used for giving information on the place at which the event will take place.
        • In future version this will be an array of coordinate using google maps in order to render a precise location.
      • event_age_range
        • Field of string data-type that is used for giving information on the age range that the event is intended for.
        • It is validated by a pattern attribute of the form’s input field.
      • event_date
        • Field of string data-type that is used for giving information on the date at which the event will take place.
        • It is validated by the input type of the form.
      • event_time
        • Field of string data-type that is used for giving information on the time at which the event will take place.
        • It is validated by the input type of the form.
      • event_description
        • Field of string data-type that is used for event description.
        • This is used for users to share information about the event they have created.
      • event_created_by
        • Field of ObjectId data-type that is used in order to know who created the event in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website.
      • event_joined_by
        • Field of array data-type that is used in order to know which users have joined the event in order to display the number of people attending the event. This can be used in a later version of the website to send specific notifications to users and have information on how popular is an event. As well it could give information on the type of event that users prefer.
      • event_likes
        • Field of array data-type that is used in order to know which users have liked the event in order to display the number of people that liked the event. This can be used in a later version of the website to send specific notifications to users and have information on how popular is an event. As well it could give information on the type of event that users prefer.

    The data pattern is controlled by the corresponding class. This allows to have quick access to the information the documents will hold and to be able to change the data type and data structure in an efficient and effective manner.

    Almost all functions/methods concerning the collection are coded in the corresponding class in order to be able to add or change those with ease and to separate the concerns.

    Code Organisation

    The project uses Flask and I have implemented Application Factory and Blueprint allowing separation of concern and clearer code.

    The code structure includes app.py file that initialise the App and a folder called app that host all the development code as well as the implementation of Blueprint in __init__.py and the App configuration in config.py.

    The use of Flask framework implies the creation of a static and templates folder. The static folder host the *.js, *.css, *.json files and all images.

    I have Created:

    • A classes folder that will host the python files related to the classes used for the project.
    • A validators folder that host the validation functions for the project.
    • A flashes folder that host all the flash messages.

    Technologies Used

    Programming Languages

    This project uses HTML, CSS, JavaScript and Python and Jinja templating language.

    Frameworks, Libraries and Programs

    • Flask
      Flask is the micro framework on witch the project is build.

    • MongoDB
      For hosting the database.

    • Balsamiq
      For creating wireframes.

    • miro whiteboard
      For producing the flowchart.

    • Google Fonts
      For importing fonts (Fredoka One, Handlee and Andika New Basic) into the style.css file.

    • Google Fonts Icons
      For material icons used throughout the website.

    • favicon.io
      For generating the favicon.

    • TinyPNG or Squoosh
      For resizing all the images.

    • BeFunky For cropping some images.

    • Adobe Color
      For extracting the color scheme used on the website.

    • Am I Responsive?
      For providing screenshots of the responsiveness of the website across several devices.

    • techsini
      For Multi Device Website Mockup Generator.

    • Autoprefixer CSS online
      For adding prefixer in style.css for cross browser compatibility.

    • EmailJS
      For email service implementation using API without server.

    • Git
      For Version control.

    • GitPod
      For Integrated Development Environment.

    • GitHub
      For hosting the repository.

    • Heroku
      For deploying the website live.

    🔙 Table of Content

    Testing

    Testing information are published in a separate file for better readability. Please see TESTING.md.

    Deployment

    Deployment information are published in a separate file for better readability. Please see DEPLOYMENT.md.

    Bugs

    ❌ Issue: I got the following message error: runtimeerror-working-outside-of-request-context. :heavy_check_mark: Solve:
    I saved request.form.get in a var named form_field in order to help me with coding and repetition, but a request in Flask is an instance of the Request object and handle one request at the time and therefore cannot be stored in a var.

    ❌ Issue:
    When updating the profile info, the rendering of the info on the profile page don’t update and after login out, It was not possible to log back in. I was getting the flash message incorrect_details, but details were right. :heavy_check_mark: Solve:
    The problem was because I used the User class to update the info, It hashed the password again, which I believe created a double hashed password and when checking the password validation It could not find a match.
    I changed the approach and did not convert the new info into an instance of User, but use a static method of the class taking as parameter the dictionary of the new info.

    ❌ Issue:
    When Updating the profile info, the updated profile info don’t render on the profile template when updating the username. This must be because I rely on the username when rendering the profile page. :heavy_check_mark: Solve:
    Update the session cookie (session["user"]) after updating the database and before rendering the profile template with the new sesion["user"]:

    # Update the session['user]
    session["user"] = new_info["username"]

    ❌ Issue: On iPhone when trying to see an event by clicking on the SEE button, nothing happens.
    ✔️ Solve:
    I have added touchend event with the click event in events.js.

    ❌ Issue: When signing up from my iPhone, I can create a profile and log in with the credential but the document does not appear in MongoDB. It shows that there are one too many document in the users collection. So the document was accessible from the website, existing in the database but not accessible and visible in the database.
    ✔️ Solve:
    No able to recreate the bug, but I believe it was because the page was kept open while the user was deleted from the database.

    Credits

    Code

    Neil Lunn from stackoverflow
    For sorting MongoDB query

    Fenton enable click
    For how to trigger click event on smartphone.

    GeeksforGeeks file validation
    For file size validation adapted to website needs.

    GeeksforGeeks 404 error with flask
    For providing explanation and code on how to render the 404 page in Flask.

    Miguel Grinberg
    For file upload explanations.

    Content

    W3schools

    W3docs

    stack overflow

    GeeksforGeeks

    Net Lawman
    For privacy policy template.

    Acknowledgements

    Special thanks to all Code Institute’s team (“Teacher”, Lecturers and Tutors) that are making me more knowledgeable and are making this happen.

    Huge thank you to the Slack community, all the members and all the leads and tutors for their help and support.

    I am hugely grateful to my mentor Chris Quinn for guiding me through this project.

    🔙 Table of Content

    Visit original content creator repository https://github.com/Tom-Nagy/family-friendly
  • family-friendly

    Family Friendly

    Mockup

    Visit the live Website : Family Friendly ➡️.

    Family Friendly is a community based application where families can get together and have fun. This project promotes togetherness, fun and community through activities.
    It is difficult sometimes as new or experience parents to find the motivation to go out and do something with the hectic parenting life. You would have to organize something or think about going somewhere on top of preparing what you need to bring with you for your little one and for yourself. So you would consider doing nothing, stay put and deal with the craziness happening at home. A lot of different factors could amplify the sentiment.
    This can lead to inactivity, confinement and mental distress which only feed the vicious cycle.

    In order to help parents and/or caretaker, I propose Family Friendly.
    This platform will propose features including a list of events coming up, the possibility to create and join event and access to support that provide useful contacts and information. As well a forum that allow users to share tips and help each other in a format of Question and Answer.

    Table of Content

    Project

    Project Goals

    This project is offering an application with a welcoming and fun environment to enable and empower users to go out, join activities and events. Encourage users to meet with the community, have fun and share good memories. It promotes healthy lifestyle and mental health.

    Developer and Business Goals

    • Develop an interactive website with a server connection using HTML, CSS, JavaScript and Python.
    • Provide a user-friendly application.
    • Contribute to the community.
    • Help parents.
    • Promote Wellness and health through activities.
    • Help personal and family growth.

    User Goals

    • Easy to use application.
    • Getting clear information.
    • Quick access to Events.
    • Practical way to participate and be part of the community.

    🔙 Table of Content

    UX

    Audience definition

    1. The primary targeted audience is Families and more precisely Parents.
    2. The secondary targeted audience is Children.

    The primary audience for this application is looking for:

    • Getting together.
    • Going out and/or outside.
    • Having fun as a family.
    • Sharing parental tips/advise.
    • Supporting each other.
    • Socialization of the children.
    • Participating in a healthy community.

    The secondary audience for this application is looking for:

    • Having fun.
    • Discovering.
    • Meeting and Making friends.

    This application is the best way to answer their needs because:

    • Activities are created and proposed by users, for them and the community.
    • It provides the possibility to Create and Join Events.
    • Events are accessible in a click.
    • You can identify immediately if there is a suitable Event for you and your family.
    • You can Create and Join Events on the go.
    • It offers parenting tips and a space where parents can browse content relevant to them.
    • It is a User Centric Design approach:
      • It is a simple application to use.
      • It is very specific and get to the point.
      • The information are displayed in a fashion that is not overwhelming and easy to learn.

    User stories

    First time users

    As a first time user:

    1. I want the application to be easy to navigate and appealing.
    2. I want to find information in an obvious manner without having to look for it.
    3. I want to find events and identify instantly:
      • The type of activity.
      • The appropriate age to participate.
      • The location.
      • The date and time.
    4. I want to sign up and create a profile.
    5. I want to log in.
    6. I want to log out.
    7. I want to be able to join an event.
    8. I want to be provided with easy instructions on how to create an event.
    9. I want to be able to create an event.
    10. I want to have access to the support page where I can find:
      • Useful contacts.
      • Parenting advices.
      • A space where I can share ideas and/or ask questions and advices.

    Returning users

    As a returning user:

    1. I want to be able to cancel my participation in an event.
    2. I want to be able to cancel an event I created.
    3. I want to be able to modify an event I created.
    4. I want to be able to modify my profile.
    5. I want to be notified when there is a change on an event I am participating in.
    6. I want to be notified when people join or cancel an event I Created.
    7. I want to post a question or advice on the support page.
    8. I want to edit or delete a question or advice I created on the support page.
    9. I want to participate in topic on the support page.
    10. I want to propose a useful contact.

    🔙 Table of Content

    Design Choices

    Fonts

    Considering the targeted audience, the sans serif type of font is the more appropriate because it is most often associated with simplicity and straightforwardness.
    I will be using:

    • Pacifico for the name of the website (Family Friendly) only. It is a handwriting type of font which is very friendly and welcoming with its roundness and has something fun to it that relates to the website.

    • Lato and Nunito are used for the rest of the website. They both are sans serif fonts, and they work very well together. They are comforting, simple and easy to ready.

    Sans serif will be use as a fall back if the fonts do not load. It is common as the main typographies are sans serif type.

    Icons

    • Some Font Awesome icons will be part of the website for better UX.
    • The logo and favicon are the same image and use the color scheme of the website.

    logo

    Colors

    Color palette

    The colours chosen for the website are simple and joyful. They are based on the psychology behind colours (colour affects, London Image Institute). I used Adobe Color to create the colour scheme.

    • Yellow #E9F900 for Friendliness and Warmth.
    • Blue #0845FF for Confidence, Sincerity and Integrity.
    • Red #FF091E for cancelling and deleting functionality.
    • Orange #FF8401 for Creativity and Innovation.
    • Green #24C212 for Life, Growth and Nature.
    • The background will be off White #FAFAFA for simplicity and cleanliness.
    • Footer will be Grey #999999 for a nice contrast.

    Adobe Color was used to build the color compatibility and accessibility. The color scheme and swatches are said color-blind safe.

    Color accessibility

    Images

    The images will be the one uploaded by users for their profile.
    Those images are stored using base64 to encode the image and store it as a string in the user collection.

    Styling/Feeling

    The feel of the website is welcoming and simple to provide a quick access and learning process.
    It makes users comfortable and make them want to try!

    Audio/Video

    No audio or video will be integrated at the moment.

    🔙 Table of Content

    Wireframes

    Site map

    The following is part of the future features to implement.

    For the full version:

    🔙 Table of Content

    Different design

    Thinking on how usable and intuitive the carousel is to scroll thought Events, considering that it could be a lot of them, I have decided to implement collapsible to display all the events across the website.

    After considering deadline and features priority, I decided to leave the support section for future features to implement. I once heard that the project is never finished, we just run out of time!

    🔙 Table of Content

    Features

    To build this project, I use Flask framework with the Jinja templating language. For consistency across the website some features will be repeated and functionality will be kept as simple and direct as possible.

    Existing and Future Features are published in a separate file, please see FEATURES.md for full details.

    Flowchart

    Website flowchart Website flowchart pdf

    🔙 Table of Content

    Data

    All the data schemas have been saved in JSON files in app/static/js/data-schemas

    Most of the data is saved as a string and the format of the string is validated by pattern attribute in all the forms.

    Data Stories

    • For the website code production, two collections have been used in MongoDB:

      • users
      • events
    • The users collection is organised following the user data-schema as shown below:

      • user data schema sample
      • _id
        • Default field given automatically when creating a document in MongoDB. It is unique and allows to identify each document.
      • username
        • Field of string data-type that is used for users to personalized their profile. It must be unique.
        • This field is validated by checking its value against all username’s field value created in the user collection. As well a pattern attribute is used on the form’s input field.
      • first_name
        • Field of string data-type that is used for users to personalized their profile.
        • This field is validated with a pattern attribute on the form’s input field.
      • last_name
        • Field of string data-type that is used for users to personalized their profile.
        • This field is validated with a pattern attribute on the form’s input field.
      • email
        • Field of string data-type that is used for users to personalized their profile. It must be unique.
        • This field is validated by checking its value against all email’s field value created in the user collection. As well a pattern attribute is used on the form’s input field.
      • password
        • Field of string data-type that is used for security.
        • Before to be stored the password is hashed and salted using werkzeug security module of Flask. It is asked to enter the password twice and a validator is used to check if the passwords correspond to the regex pattern and that they are the same.
        • When the password is used/asked on the website, it is validated by checking the password in the input field against the password saved in the database using werkzeug security tools.
      • profile_picture
        • Field of string data-type that is used for profile personalization.
        • To store the image, I have used base64 to encode the image and store it as a string. The image is first downloaded, then encoded and stored and then delete so only the string saved in the database remains.
      • events_created
        • Field of array data-type that is used in order to know which events have been created by the user in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website.
      • events_joined
        • Field of array data-type that is used in order to know which events have been joined by the user in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website.
      • events_liked
        • Field of array data-type that is used in order to know which events have been liked by the user in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website. As well it could give information on the preferences off the user.
    • The events collection is organised following the user data-schema as shown below:

      • user data schema sample
      • _id
        • Default field given automatically when creating a document in MongoDB. It is unique and allows to identify each document.
      • event_category
        • Field of string data-type that is used for giving information on the category of the event.
        • It is validated by the select option of the form.
        • This can provide information on what type of event is preferred by users.
      • event_location
        • Field of string data-type that is used for giving information on the place at which the event will take place.
        • In future version this will be an array of coordinate using google maps in order to render a precise location.
      • event_age_range
        • Field of string data-type that is used for giving information on the age range that the event is intended for.
        • It is validated by a pattern attribute of the form’s input field.
      • event_date
        • Field of string data-type that is used for giving information on the date at which the event will take place.
        • It is validated by the input type of the form.
      • event_time
        • Field of string data-type that is used for giving information on the time at which the event will take place.
        • It is validated by the input type of the form.
      • event_description
        • Field of string data-type that is used for event description.
        • This is used for users to share information about the event they have created.
      • event_created_by
        • Field of ObjectId data-type that is used in order to know who created the event in order to tailor action available on this event. This can be used in a later version of the website to send specific notifications and have information on how active is the user on the website.
      • event_joined_by
        • Field of array data-type that is used in order to know which users have joined the event in order to display the number of people attending the event. This can be used in a later version of the website to send specific notifications to users and have information on how popular is an event. As well it could give information on the type of event that users prefer.
      • event_likes
        • Field of array data-type that is used in order to know which users have liked the event in order to display the number of people that liked the event. This can be used in a later version of the website to send specific notifications to users and have information on how popular is an event. As well it could give information on the type of event that users prefer.

    The data pattern is controlled by the corresponding class. This allows to have quick access to the information the documents will hold and to be able to change the data type and data structure in an efficient and effective manner.

    Almost all functions/methods concerning the collection are coded in the corresponding class in order to be able to add or change those with ease and to separate the concerns.

    Code Organisation

    The project uses Flask and I have implemented Application Factory and Blueprint allowing separation of concern and clearer code.

    The code structure includes app.py file that initialise the App and a folder called app that host all the development code as well as the implementation of Blueprint in __init__.py and the App configuration in config.py.

    The use of Flask framework implies the creation of a static and templates folder. The static folder host the *.js, *.css, *.json files and all images.

    I have Created:

    • A classes folder that will host the python files related to the classes used for the project.
    • A validators folder that host the validation functions for the project.
    • A flashes folder that host all the flash messages.

    Technologies Used

    Programming Languages

    This project uses HTML, CSS, JavaScript and Python and Jinja templating language.

    Frameworks, Libraries and Programs

    • Flask
      Flask is the micro framework on witch the project is build.

    • MongoDB
      For hosting the database.

    • Balsamiq
      For creating wireframes.

    • miro whiteboard
      For producing the flowchart.

    • Google Fonts
      For importing fonts (Fredoka One, Handlee and Andika New Basic) into the style.css file.

    • Google Fonts Icons
      For material icons used throughout the website.

    • favicon.io
      For generating the favicon.

    • TinyPNG or Squoosh
      For resizing all the images.

    • BeFunky For cropping some images.

    • Adobe Color
      For extracting the color scheme used on the website.

    • Am I Responsive?
      For providing screenshots of the responsiveness of the website across several devices.

    • techsini
      For Multi Device Website Mockup Generator.

    • Autoprefixer CSS online
      For adding prefixer in style.css for cross browser compatibility.

    • EmailJS
      For email service implementation using API without server.

    • Git
      For Version control.

    • GitPod
      For Integrated Development Environment.

    • GitHub
      For hosting the repository.

    • Heroku
      For deploying the website live.

    🔙 Table of Content

    Testing

    Testing information are published in a separate file for better readability. Please see TESTING.md.

    Deployment

    Deployment information are published in a separate file for better readability. Please see DEPLOYMENT.md.

    Bugs

    ❌ Issue: I got the following message error: runtimeerror-working-outside-of-request-context. :heavy_check_mark: Solve:
    I saved request.form.get in a var named form_field in order to help me with coding and repetition, but a request in Flask is an instance of the Request object and handle one request at the time and therefore cannot be stored in a var.

    ❌ Issue:
    When updating the profile info, the rendering of the info on the profile page don’t update and after login out, It was not possible to log back in. I was getting the flash message incorrect_details, but details were right. :heavy_check_mark: Solve:
    The problem was because I used the User class to update the info, It hashed the password again, which I believe created a double hashed password and when checking the password validation It could not find a match.
    I changed the approach and did not convert the new info into an instance of User, but use a static method of the class taking as parameter the dictionary of the new info.

    ❌ Issue:
    When Updating the profile info, the updated profile info don’t render on the profile template when updating the username. This must be because I rely on the username when rendering the profile page. :heavy_check_mark: Solve:
    Update the session cookie (session["user"]) after updating the database and before rendering the profile template with the new sesion["user"]:

    # Update the session['user]
    session["user"] = new_info["username"]

    ❌ Issue: On iPhone when trying to see an event by clicking on the SEE button, nothing happens.
    ✔️ Solve:
    I have added touchend event with the click event in events.js.

    ❌ Issue: When signing up from my iPhone, I can create a profile and log in with the credential but the document does not appear in MongoDB. It shows that there are one too many document in the users collection. So the document was accessible from the website, existing in the database but not accessible and visible in the database.
    ✔️ Solve:
    No able to recreate the bug, but I believe it was because the page was kept open while the user was deleted from the database.

    Credits

    Code

    Neil Lunn from stackoverflow
    For sorting MongoDB query

    Fenton enable click
    For how to trigger click event on smartphone.

    GeeksforGeeks file validation
    For file size validation adapted to website needs.

    GeeksforGeeks 404 error with flask
    For providing explanation and code on how to render the 404 page in Flask.

    Miguel Grinberg
    For file upload explanations.

    Content

    W3schools

    W3docs

    stack overflow

    GeeksforGeeks

    Net Lawman
    For privacy policy template.

    Acknowledgements

    Special thanks to all Code Institute’s team (“Teacher”, Lecturers and Tutors) that are making me more knowledgeable and are making this happen.

    Huge thank you to the Slack community, all the members and all the leads and tutors for their help and support.

    I am hugely grateful to my mentor Chris Quinn for guiding me through this project.

    🔙 Table of Content

    Visit original content creator repository https://github.com/Tom-Nagy/family-friendly
  • diabetes

    Diabetes Diagnosis

    Summary

    Early diagnosis and treatment of diabetes are essential to avoid complications such as blindness, kidney failure, heart attacks, stroke and lower limb amputation. In this work, we compared and critically evaluated the use of Multilayer Perceptron (MLP) and Support Vector Machine (SVM) to aid the diagnosis of diabetes using the Pima Indian Diabetes database. The PyTorch and Scikit-learn packages in Python were used to build the models.

    Both MLP and SVM yielded similar test AUCs and accuracies. MLP’s higher specificity (true negative rate) of 89% compared to SVM (78%) (Figures 1-3) makes MLP more suitable for practical use, as it is more capable of identifying the dominating class of non-diabetes patients.

    Figure 1. The bottom right of the normalised confusion matrix of the optimised Support Vector Machine (SVM) indicated it has a specificity of 78%.

    Figure 2. The normalised confusion matrix of the optimised Multilayer Perceptron (MLP) indicated it has a higher specificity (89%) than Support Vector Machine (SVM).

    Figure 3. The Receiver Operation Curve (ROC) revealed Support Vector Machine (SVM) algorithm displayed a slightly higher sensitivity than Multilayer Perceptron (MLP) algorithm. The optimal false positive rate and true positive rate for SVM (28.0%, 77.8%) and MLP (35.0%, 88.9%) are indicated with a green dot and a blue dot respectively.

    Resources

    The full report can be accessed here.

    Diabetes-Modelling-Final.ipynb contains the Python codes used to construct, evaluate and compare optimised Multilayer Perceptron and Support Vector Machine models.

    Diabetes-Preprocessing.ipynb includes the details of pre-processing and exploration of the dataset.

    Visit original content creator repository https://github.com/hybchow/diabetes
  • Labyrinthe

    Labyrinthe

    Le but est de creer un labyrinthe en utilisant des éléments vus en cours de terminale comme les piles, File, Graphe etc…
    Une fois crée le but est de trouver le chemin le plus court pour sortir du labyrinthe.
    Tout ça affichait dans une fenêtre Tkinter.

    Roadmap

    Creer le Labyrinthe

    Tkinter :

    • Afficher une page vierge.
    • Faire un cadre où se trouve le labyrinthe.
    • Afficher les murs.
    • Afficher l’entrée/sortie.
    • Afficher le plus court chemin
    • Afficher la distance du plus court chemin
    • Afficher les autres chemins possibles avec leurs distances [Bonus].
    • Faire qu’on puisse générer avec un bouton [Bonus]
    • Faire qu’on puisse le résoudre depuis l’app avec des boutons [Bonus]
    • Pouvoir gérer la grandeur du labyrinthe à générer sans devoir modifier le code [Bonus]

    Mur & Chemins:

    • Créer des murs sur toutes les cases du tableau de 25×25.
    • Définir une entrée et une sortie.
    • Casser certains murs de façons aléatoires.
    • Faire qu’il n’y est pas de chemins inutiles
    • Faire qu’il n’y est pas de murs inutiles
    • Toujours un chemin entre l’entrée et la sortie
    • Faire plusieurs sorties possibles [Bonus].
    • Avoir le temps de création du labyrinthe [Bonus].

    Seed:

    • Créer des labyrinthe suivant une seed
    • Afficher la seed

    Recherche du plus court chemin dans le graphe :

    • Dire le plus court chemin avec les noms ou valeurs des points traversé.
    • Afficher le plus court chemin
    • Avoir en combien de temps la sortie a était trouvé [Bonus].

    Informations

    Création du labyrinthe

    Les murs peuvent être définis de la manière suivante :

    • Par des listes
      lab=[0,1,1,0,0,1,1,0,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,0,1],[etc...]
      Image Labyrinthe liste.
      où les “1” correspondent à un mur (représenté par du rouge),”0″ à un chemin,”2″ l’entrée et “3” la sortie.

    Résolution du labyrinthe

    Le labyrinthe va être résolu à l’aide d’une recherche du plus court chemin, en numérotant à partir du points de départ la distance entre chaque case représentant un chemin, depuis la case de départ.
    Image Labyrinthe liste distances.
    Puis partir du point d’arrivée et suivre les nombres inférieurs à la distance où on se trouve jusqu’à arriver à 0 et l’afficher.
    Image Labyrinthe liste distances chemin.
    (en vert un chemin choisi arbitrairement pour représenter le plus court chemin et en jaune les autres parties de chemins possibles)

    Visit original content creator repository https://github.com/Jerem-EstIcI/Labyrinthe
  • cdb

    Change Directory Bookmark

    This tool allows to cd to named directories.

    Implementation

    There is a shell front end that calls a binary back end. The front end is merely
    there to call cd after calling the back end, which does all the logic.

    Requirements

    Works at least with Bash, on Linux (Debian and Ubuntu) and Mac.

    The code uses C++, version C++11, and Bash. It was tested to work on Linux and
    Mac. The C++ Boost libraries Filesystem and System are
    used (sudo apt-get install libboost-all-dev can be used to install the Boost
    libraries on Debian).

    The compilation of executables was done using the GCC, and make.

    Installation

    Make it so the files from the front end are sourced. These file call the
    executables cdb-back and cdb-bc. Compile the back end executables and either
    make links to them in a location in the PATH or move them there and name them
    appropriately.

    You can also run the file install.sh.

    Mac OS Caveat

    On Mac OS, since El Capitan, terminal sessions are saved by default (this is
    like logging every command and result). This results in the following text
    appearing in some calls to a subshell (things like $(...)):

    Saving session...
    ...saving history...truncating history files...
    ...completed.
    
    

    To avoid this (annoyance), you can create the file ~/.bash_sessions_disable.
    More information here, here, and here.

    Visit original content creator repository
    https://github.com/pat-laugh/cdb

  • NoteApp-Todo-App

    Key Points
    It seems likely that Note is a program written in Kotlin, using Jetpack Compose for the user interface, Hilt for dependency injection, following the MVVM architecture, and Room for data storage.
    The evidence leans toward the program also utilizing Jet Pack libraries, though this may overlap with the mentioned technologies.
    Program Description
    Overview

    Note appears to be an Android application developed with a modern tech stack, focusing on ease of use and maintainability. The use of Kotlin as the programming language suggests a robust and concise codebase, while Jetpack Compose provides a modern, declarative way to build the user interface.

    Technologies Used

    Kotlin: The primary programming language, known for its conciseness and interoperability with Java.
    Jetpack Compose: A toolkit for building native Android UI, part of the Jet Pack suite, offering a reactive and declarative approach.
    Hilt: A dependency injection library that simplifies managing dependencies in Android apps, enhancing modularity.
    MVVM (Model-View-ViewModel): An architectural pattern that separates the app’s logic into manageable layers, improving scalability and testability.
    Room: A SQLite object-mapping library for local data storage, ensuring efficient data persistence.
    Unexpected Detail

    While the user mentioned “Jet Pack” separately, it seems likely that this refers to the broader Jet Pack suite, which includes Jetpack Compose and Room, suggesting some redundancy in the listing but highlighting a comprehensive use of Android development tools.

    Survey Note: Detailed Analysis of Note Program Technologies
    This section provides an in-depth exploration of the technologies used in the Note program, as described by the user, and aims to clarify the stack based on common Android development practices. The analysis is grounded in the user’s statement and supplemented by understanding typical usage in similar projects.

    Background and Context
    The user indicated that Note is a program written with “Kotlin, Jet Pack, Compose, Hilt, MVVM, and Room.” This suggests an Android application leveraging modern development tools, likely targeting mobile devices. The mention of multiple technologies, some of which overlap (e.g., Jet Pack and Compose), requires careful interpretation to avoid redundancy and ensure accuracy.

    Detailed Technology Breakdown
    To dissect the technologies, let’s examine each component based on the user’s description and common Android development practices:

    Kotlin:
    Kotlin is a statically typed programming language developed by JetBrains, widely adopted for Android development due to its conciseness, null safety, and interoperability with Java. It is the foundation of the Note program, indicating a modern, efficient codebase. Research suggests Kotlin’s adoption has grown significantly, with Google endorsing it as a preferred language for Android (Android Developers Kotlin).
    Jet Pack and Compose:
    The user mentioned “Jet Pack” and “Compose” separately, which initially suggests redundancy. Jet Pack is a suite of libraries, tools, and guidance from Google to build high-quality Android apps, including components like Navigation, Lifecycle, Room, and Paging. Jetpack Compose, however, is a specific part of Jet Pack, a modern toolkit for building native Android UI declaratively. Given this, it seems likely that “Jet Pack” refers to the broader suite, and “Compose” highlights the specific use of Jetpack Compose for the UI. This interpretation aligns with projects like Hilt-MVVM-Compose-Movie, which list “Jetpack Compose” as a key technology.
    Hilt:
    Hilt is a dependency injection library for Android, built on Dagger, designed to simplify managing dependencies in apps. It integrates well with Jet Pack components, enhancing modularity and testability. The user’s mention of Hilt suggests Note uses this for managing dependencies, a common practice in modern Android apps, as seen in Getting Started With Room Database in Kotlin + Jetpack Compose.
    MVVM (Model-View-ViewModel):
    MVVM is an architectural pattern that separates the application logic into three interconnected components: Model (data and business logic), View (UI), and ViewModel (mediates between Model and View). The user’s inclusion of MVVM indicates Note follows this pattern, which is recommended by Google for Android development, improving scalability and testability. This is evident in projects like Building an Android App with Jetpack Compose, Retrofit, and MVVM Architecture.
    Room:
    Room is a persistence library provided by Android, part of Jet Pack, that simplifies working with SQLite databases. It offers an abstraction layer over SQLite, making it easier to manage local data storage. The user’s mention of Room suggests Note uses it for data persistence, a standard choice for Android apps needing local storage, as seen in Android | Kotlin | API | MVVM | Retrofit | Dagger | Hilt | Coroutines | Jetpack Compose | Room.
    Interpretation and Clarification
    The listing of “Jet Pack” and “Compose” separately raises a potential overlap, as Compose is part of Jet Pack. It seems likely that the user intended to highlight the use of Jetpack Compose specifically for the UI, while “Jet Pack” might refer to other libraries within the suite (e.g., Navigation, Lifecycle). However, to avoid redundancy, it’s reasonable to interpret this as Note using Jetpack Compose as the UI framework, with other Jet Pack components implicitly included.

    The technologies Hilt, MVVM, and Room are clearly defined: Hilt for dependency injection, MVVM for architecture, and Room for data storage. This stack aligns with modern Android development best practices, emphasizing clean architecture and maintainability.

    Table: Technology Roles in Note Program
    Technology Role Notes
    Kotlin Programming Language Foundation for the codebase, concise and safe.
    Jetpack Compose UI Framework Declarative UI building, part of Jet Pack.
    Hilt Dependency Injection Manages dependencies, enhances modularity.
    MVVM Architectural Pattern Separates logic for scalability and testing.
    Room Data Persistence Local SQLite database management.
    Unexpected Detail: Potential Redundancy
    An interesting observation is the potential redundancy in mentioning “Jet Pack” and “Compose” separately. While Compose is a subset of Jet Pack, the user’s explicit mention suggests a focus on highlighting the UI framework, which is not surprising given its popularity in recent Android projects. This detail underscores the importance of clear documentation to avoid confusion in tech stacks.

    Conclusion
    Based on the user’s description, Note is likely a well-structured Android application written in Kotlin, utilizing Jetpack Compose for the user interface, Hilt for dependency injection, following the MVVM architecture, and Room for data storage. The mention of “Jet Pack” may refer to the broader suite, with Compose specifically emphasized, reflecting a comprehensive use of modern Android development tools.

    Visit original content creator repository
    https://github.com/amirsolgi1999/NoteApp

  • Sop.Data

    背景

    面对ORM工具的选型,用过PetaPoco
    SqlSugarnhibernate-coreEntityFrameworkCore、 ORM选择是一个非常纠结切难以下手的问题。当时围绕Dapper、EF、Nhibernate发生了激烈的讨论。 选择EF因为微软的支持,同时选择Dapper代替ADO.NET 操作数据库,而且Dapper比PetaPoco、SqlSugar好在使用的人多且环境多,出现的问题和支持可以得到很好的解决。

    为什么选择EF+Dapper

    目前来说EF和Dapper是.NET平台最主流的ORM工具,团队成员的接受程度很高,学习成本最低,因为主主流,所以相关的资料非常齐全,各种坑也最少。

    介绍

    1. 支持工作单元模式,也支持事务,也支持数据库仓储和工作单元模型
    2. 能帮助你快速的构建项目的数据访问层
    3. 支持EF和Dapper ,简单操作使用EF,复杂sql操作使用Dapper
    4. 支持Mysql和Mssql
    5. 支持同步和异步操作,推荐使用异步
      PS:参考其他开源项目,切使用MIT协议的项目

    使用方法

    引入nuget

    <PackageReference Include="Sop.Data" Version="1.0.0" />
    

    创建实体对象,继承IEntity

        public class School : IEntity
        {
            public int Id { get; set; }
            public string SchoolId { get; set; }
            public string Name { get; set; }
        }
    

    创建仓储接口和实现类,分别继承IRepository和EfCoreRepository

        public class SchoolRepository: EfCoreRepository<School>,ISchoolRepository
        {
            public SchoolRepository(DbContext context) : base(context)
            {
            }
        }
    
        public interface ISchoolRepository : IRepository<School>
        {
    
        }
    

    注入服务

        private readonly IUnitOfWork _unitOfWork;
        private readonly ISchoolRepository _schoolRepository; 
        /// <summary>
        /// 
        /// </summary>
        public MsEfDbRepositoryTest()
        {
            var services = new ServiceCollection();
            services.AddSopData<EfDbBaseDbContext>(opt =>
            {
                opt.UseMySql("server =127.0.0.1;database=soptestdb;uid=root;password=123456;");
            });
            var sp = services.BuildServiceProvider();
            _unitOfWork = sp.GetRequiredService<IUnitOfWork>();
            _schoolRepository = sp.GetRequiredService<ISchoolRepository>(); 
                
        }
    

    在Controller中使用

    public class ValuesController : ControllerBase
    {
        private readonly ISchoolRepository _schoolRepository;
        private readonly IUnitOfWork _unitOfWork;
        public ValuesController(ISchoolRepository schoolRepository, IUnitOfWork unitOfWork)
        {
            _schoolRepository = schoolRepository;
            _unitOfWork = unitOfWork;
        }
    }
    

    详细使用说明

    查询

    //根据主键查询
    _schoolRepository.GetById(Id)
    

    //不带追踪的查询,返回数据不能用于更新或删除操作,性能快
    schoolRepository.TableNoTracking.First(x => x.Id == Id);
    

    //带追踪的查询,返回数据可以用于更新或删除操作,性能稍慢
    schoolRepository.Table.First(x => x.Id == Id);
    

    //分页查询
    _schoolRepository.TableNoTracking.ToPagedList(1,10);
    

    //sql语句查询
    _unitOfWork.QueryAsync<School>("select * from school");
    
    

    //sql分页查询
    _unitOfWork.QueryPagedListAsync<School>(1, 10, "select * from school order by id");
    

    关于查询,暴露了返回IQueryable的TableNoTracking、Table这两个属性,让开发人员自己组装Lambda表达式进行查询操作

    新增

    //新增,支持批量新增
    _schoolRepository.Insert(school);
    _unitOfWork.SaveChanges();
    

    //sql语句新增
    _unitOfWork.ExecuteAsync("insert school(id,name) values(@Id,@Name)",
                            school);
    

    编辑

    //编辑,支持批量编辑
    var school = _schoolRepository.GetByIdAsync(Id);
    school.Name="newschool";
    _schoolRepository.Update(school);
    _unitOfWork.SaveChanges();
    

    //编辑,不用先查询
    var school = new School
    {
        Id = "xxxxxx",
        Name = "newschool"
    };
    _schoolRepository.Update(school, x => x.Name);
    _unitOfWork.SaveChanges();
    

    //sql语句编辑
    _unitOfWork.ExecuteAsync("update school set name=@Name where id=@Id",
                            school);
    

    删除

    //删除,支持批量删除
    _schoolRepository.Delete(school);
    _unitOfWork.SaveChanges();
    

    //根据lambda删除
    _schoolRepository.Delete(x => x.Id == Id);
    _unitOfWork.SaveChanges();
    

    事务

    //工作单元模式使用事务
    await _schoolRepository.InsertAsync(school1);
    await _schoolRepository.InsertAsync(school1);
    await _unitOfWork.SaveChangesAsync();
    

    //dapper使用事务
    using (var tran = _unitOfWork.BeginTransaction())
    {
        try
        {
            await _unitOfWork.ExecuteAsync("insert school(id,name) values(@Id,@Name)",
                school1,tran);
            await _unitOfWork.ExecuteAsync("insert school(id,name) values(@Id,@Name)",
                school2,tran);
            tran.Commit();
        }
        catch (Exception e)
        {
            tran.Rollback();
        }
    }
    

    //dapper+ef混合使用事务
    using (var tran = _unitOfWork.BeginTransaction())
    {
        try
        {
            await _schoolRepository.InsertAsync(school1);
            await _unitOfWork.SaveChangesAsync();
    
            await _unitOfWork.ExecuteAsync("insert school(id,name) values(@Id,@Name)",
                school2);
            tran.Commit();
        }
        catch (Exception e)
        {
            tran.Rollback();
        }
    }
    

    高级用法

    //通过GetConnection可以使用更多dapper扩展的方法
    _unitOfWork.GetConnection().QueryAsync("select * from school");
    

    协议

    MIT

    Visit original content creator repository
    https://github.com/csharphelp/Sop.Data

  • file-station

    file-station

    Just a single-file net disk/file manager prepared for single user.

    Features

    • Don’t need nginx, apache, just download single binary file and run
    • Authentication
    • Upload, download, delete, rename, move and search files
    • Share files
    • Preview audio/video/image/markdown

    Screenshot

    Click to show main_ui image_preview

    Quick start

    Download

    You can get prebuild binary file from HERE

    Add some options

    Add environment variable below to customize configs.

    Name Default Explain
    FS_FOLDER ./files File folder, store all files in here
    FS_DATABASE ./database.db Database position
    FS_LISTEN 127.0.0.1:5000 Listen host and port
    FS_REGISTER TRUE Can register or not (“TRUE” or “FALSE”)

    Run

    chmod +x ./file-station
    ./file-station

    Run as a service

    See deploy folder for example.

    Static Build

    rustup target add x86_64-unknown-linux-musl  # Add rust musl toolchain
    apt install musl-tools  # Install musl-gcc
    cargo build --release --target=x86_64-unknown-linux-musl

    License

    Copyright (c) 2022 chen_null
    file-station is licensed under Mulan PSL v2.
    You can use this software according to the terms and conditions of the Mulan PSL v2.
    You may obtain a copy of Mulan PSL v2 at:
             http://license.coscl.org.cn/MulanPSL2
    THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
    EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
    MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
    See the Mulan PSL v2 for more details.
    

    Alternatives

    Visit original content creator repository https://github.com/chenx6/file-station
  • trezor-mcu

    Visit original content creator repository
    https://github.com/deosai/trezor-mcu