GithubHelp home page GithubHelp logo

platform's Introduction

platform

This is the platform that powers OpenUnited. Apps are used to create "bounded contexts":

  • Product Management (Product, Capability, Initiative, Challenge, Bounty etc.)
  • Talent (Person, Skill, BountyClaim etc.)
  • Commerce (Organisation, Points & Payments etc.)
  • Engagement (Notifications etc.)

This repo contains the full platform including the frontend - which is "deliberately simple"*. We prototype and specify the target UX, as code, in the UX Prototype repo. The UX Prototype repo is not for production use, we use it instead of using Figma.

* Our "deliberately simple" frontend means that we use Jinja templates, TailwindCSS, TailwindUI, Hyperscript, plain javascript where needed, and HTMX where it improves the UX. Earlier we had a separate ReactJS frontend and a GraphQL API layer, however such fanciness failed to deliver the expected value, whilst creating complexity/friction... Therefore, we now have a deliberately simple frontend. As a result, we have about 50% less code and move way faster.

Setting up The Project and Contributing

Please follow the instructions here.

Getting Help

If you have any questions about OpenUnited:

Your feedback is always welcome.

platform's People

Contributors

adrianmcphee avatar andreparames avatar ashikzk avatar dogukanteber avatar endalkh avatar fjlendinez avatar niicck avatar sachintom999 avatar saif-uz-zaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

platform's Issues

Add Capability option to challenge form

In the Challenge model, we have a field to store a capability for a challenge. However, users cannot set a capability to a challenge using the UI. We need to add a field to the challenge form to enable users to add a capability to a challenge.

Implement Capability Detail Page

Currently, the capability detail page is not implemented. It will have the following structure:

Header/navbar, product name and capability name in crumbs, capability details listed basic styling, list related challenges, footer

Implementation of Pre-Commit Hook for Code Quality and Consistency

Objective:

  • To ensure code quality, consistency, and adherence to best practices by integrating a pre-commit hook that automates the execution of essential tools during the commit process.

Tools to be Integrated:

  • Black: For code formatting and styling
  • Isort: For maintaining consistent import order
  • Flake8: For static code analysis and linting
  • Django Migrations Check: To detect and prevent missing Django database migrations

Task Requirements:

  • Install Required Tools: Ensure that Black, Isort, Flake8, and Django are installed and available in the project's development environment.

  • Configure Pre-Commit Hook: Set up a pre-commit hook using a tool like pre-commit or husky to trigger the execution of the specified tools during the commit process.

  • Integrate Tools with Pre-Commit Hook: Configure the pre-commit hook to run the following tools in sequence:

    • Black: To format code according to the project's coding standards.
    • Isort: To organize imports in a consistent manner.
    • Flake8: To perform static code analysis and linting.
    • Django Migrations Check: To verify that all necessary Django database migrations are present and up-to-date.

Test Pre-Commit Hook:

  • Verify that the pre-commit hook is functioning correctly by attempting to commit code with intentional formatting issues, import inconsistencies, linting errors, or missing migrations.

Document Pre-Commit Hook Configuration: Maintain clear documentation on the pre-commit hook configuration, including the tools used, their versions, and any custom settings or configurations.

Tailwind is used as CDN only recommended for development

I was inspecting the project because I love Django + HTMX and your codebase is so wonderful, I appreciate the contribution to the open source.

The problem

I saw that in base.html, tailwind is inserted from CDN. Attending the documentation they advice that this is only for development purposes and they recommends another way to use for production.

The solution

Tailwind creates "Tailwind standalone", an executable that "build" the minified tailwind required without using node or similar. On the other hand, someone creates the python package "pytailwindcss" that install "Tailwind standalone" using the python package manager.

Step 1: Install

pip install pytailwindcss

Step 2: Initialize

tailwindcss init

Step 3: Configure

In tailwind.config.json

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ['templates/*.html', 'templates/**/*.html', '**/templates/**/*.html'],
  theme: {
    extend: {},
  },
  plugins: [],
}

Step 4: Build

When you decide where to start building (in CI, in precommit, deploying...) you just need to execute:

tailwindcss -o ./static/tailwind.css --minify

In my case, I have a Makefile for development that has the following command:

cssdev:
	@tailwindcss -o ./static/tailwind.css --minify -w
.PHONY: cssdev

And then, when I am developing, I start tailwind to watch changes and build the minified css required.

make cssdev

Rebuilding...

Done in 370ms.

I hope all of this help you to improve your project, keep doing this great job!

:)

Create `CONTRIBUTING_GUIDELINES.md`

We currently have the guidelines for contributing. However, it is kind of messy and not up-to-date. We need to extract these into a separate file called CONTRIBUTING_GUIDELINES.md and include how to use the watch_css_changes.sh file during the development.

Proposal for collaboration

Hi @adrianmcphee
Here is the snapshot of my local machine running this platform.
2023-10-21_080542
The following is the commands I ran.
docker pull postgres
docker run --name ou_db -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres
cp .env.example .env //replaced the secret key taken from https://djecrety,ir
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
export DJANGO_SETTINGS_MODULE=openunited.settings.development
./setup.sh
python manage.py runserver

I want to get involved in your project with my expertise in full stack development with python, django, htmx and tailwind UI.

Rewrite 404 Page using Tailwind CSS

The 404 page needs refactoring. We need to have a simple and elegant 404 page.

Before implementing the issue, one can start discussing the design under this issue.

Restrict Challenge Update

It seems that a challenge's status can be changed by anyone who uses the platform. We shouldn't do that. We need to allow challenge update only to one who created the challenge.

Do not Display the Completed Challenges

We show all the challenges on the challenge listing page regardless of their statuses. We need to have better filtering and not display the complete challenges ie. excluding the challenges that have done as their statuses.

Add `Contact Us` Page

We have a link that redirects the user to send an e-mail in the footer of the platform, Contact Us. We need to remove that link and attach another link to the Contact Us page.

Currently, we don't have any style in mind. However, it has the same functionalities as this page.

Refactoring `get_photo_url()` Methods and Associated Templates in Product and Person Models

We have two get_photo_url() methods: the first one in the Product model and the second one in the Person model.

They have pretty much the same implementation. However, they shouldn't have. They return a requires_upload parameter which is not used most of the time. Additionally, the Product model's get_photo_url() method has the same default picture as the Person model's get_photo_url() method has. We need to have a different default image for the Product model's method.

The task is to refactor those methods and every template and Python file that use these methods.

Running platform using docker

Encountered with errors like:

  1. DJANGO_SETTINGS_MODULE missing and in manage.py we get error
  2. Docker network problem

I would like to contribute this project for running with docker instructions

Add Pagination to the Challenge Listing Page

We currently show all of the challenges that exist in our platform. Since the number of challenges is not much, that wasn't a problem, until now. We need to add a pagination to the challenge listing page as the number of challenges is increasing.

Add support for cookies to Sign In Page

On the sign-in page, we have a label that says Remember Me but it does not have a checkbox next to it that remembers the user's login:

Screenshot 2023-10-27 at 11 36 27

Currently, the sign-in user keeps signed in unless he/she logs out from the account. We need to enable this Remember Me checkbox and if it's checked, we keep the user logged in for 30 days. Otherwise, we should necessitate to log in.

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.