Coder Social home page Coder Social logo

esnvutbrno / fiesta-plus Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 3.2 MB

New generation of social network for helping international students - used by sections of Erasmus Student Network. 💜 By volunteers, for volunteers.

Home Page: https://fiesta.plus

License: GNU General Public License v3.0

Makefile 0.66% Dockerfile 0.71% Python 70.61% HTML 23.45% Shell 0.02% JavaScript 1.46% CSS 2.00% Ruby 0.81% Smarty 0.29%
esn esn-vut django python erasmus-student-network erasmus erasmus-plus docker

fiesta-plus's Introduction

Fiesta+

python django kubernetes tailwind css nginx

last commit cluster deploy licence

Fiesta+

Fiesta is dead, long live Fiesta+!

New generation of social network for helping international students - used by sections of Erasmus Student Network. 💜 By volunteers, for volunteers.

Development

See the Development wiki page for more information.

Contributing

Use Pull requests -- how to prepare a great PR?

Authors

Created with love and maintained by @esnvutbrno members.

License

Distributed under the GNU GPLv3 License. See LICENSE.txt for more information.

fiesta-plus's People

Contributors

deawer23 avatar deawer234 avatar dependabot[bot] avatar erman-dev avatar petrceska avatar pre-commit-ci[bot] avatar punndcoder28 avatar snyk-bot avatar thejoeejoee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

punndcoder28

fiesta-plus's Issues

Run pylint as GH Action

  • currently, pre-commit hooks are used, but they are running without installed project dependencies
  • that's not suitable for pylint, since pylint-django loads settings.py with all imports
  • solution would be GH Action with installed deps and running pylint also with django module

old pre-commit hook:

- id: pylint
  name: Pylint with django plugin
  entry: poetry run pylint
  language: system
  exclude: "[a-zA-Z]*/(migrations)/(.)*"
  args: [
      "--load-plugins=pylint_django",
      "--django-settings-module=fiesta.settings",
  ]
  types: [ python ]
  require_serial: true

Image build caching

  • currently cache towards image repository is disabled, since it ends with HTTP 400
  • caching the build process is definitely needed, so would be nice to have i working
  • TODO in deploy.yaml
  • having standalone repository only for caching is also an option

Type checked project (typing, mypy, GH Action)

  • typing isn't currently an issue in django codebase
  • would be nice to have type-checked python sources
  • mypy works with pyproject.toml, so typing, mypy configuration and GH Action is needed
  • to do:
    • django-stubs gonna be needed
    • probably some tweaks
    • integration to flake8

Visual bugs

  • profile dropdown out of viewport on mobiles
  • too long section name breaks header into two lines
  • error pages are too big on mobiles
  • my memberships hides section name on smallest mobiles
  • footer not centred and without proper gaps
  • empty menu on the main page weirdly jumps a few pixels on activation
  • horizontal scroll on mobile tables
  • dark mode for tom-select

Automatic profile picture on ESNcard

Automatically add a profile picture to ESNcard during application from your profile picture at Fiesta
the only default value, possibility to change during the application

Suggested features from old Fiesta

Old Fiesta does have table for suggested features:

suggested feature votes planned? note
Allow users to connect to Fiesta via Facebook. 30 ✔️ #15
Let's turn this into an awesome app for our cell phones! 29
Make messenger in Fiesta!
It would be great, if we could contact foreign students directly through the Fiesta!
18
I would like to see in profile of foreign student his/her buddy (assigned local member) - so I would know who is here assigned to help this person 16 ✔️
Notifications (for example new event) 7 ✔️
Search box in the header of a web 6 ✔️
Make date of birth and country compulsary information during registration 6 ✔️
Make the "Get your ESNcard" clickable and save it in their profile, so I don't have to make another form for people asking if they want ESNcard. 6 ✔️
I would like to see in profile of local member his/her buddies (assigned foreign students) - so I would know which members are really active as a buddies 5 ✔️
Some "All in one" page, including hyperlinks to KAM VUT, CESA (+registration), kolejnet, school pages and its faculties, our FB pages, DPMB, Brno maps and many others, could be added to the panel to better inform incoming Erasmus students to get familliar 4 ✔️ probably part of section landing page
Let's use SSL in production :) 2 ✔️
Include "Event Registration" (trips, parties, games) and "Event Overview" with calendar... :) 2 ✔️
Change favicon to actual logo of fiesta 1 ✔️
Add more phone numbers links to profile. There can be only one phone number the other one I hade to write in to link "About me" 1 ✔️
dark theme/mode would be awesome 0
Allow going back to the event manager from an event
See registry status from event manager
0 ✔️
It would be great to add the possibility of turning internationals to ESN member without the necessity of creating a new account (using the same email). 0 ✔️
Please allow people to change their e-mail adress in the settings section. Also it would be nice to be able to delete the profile. Maybe include a "delete profile" button in the settings section. (I used the wrong email adress and now can not change it or 0 ✔️
Add support for apple emoticons symbols. 0 ✔️
How can I delete my fiesta account? 0 ✔️
the option to delete profile/withdraw requests 0 ✔️
Maybe create tags for the things that people like, so you can easily filter through people with the same interests as you 0
See what semester student is doing erasmus - for example Winter 2021/2022 0 ✔️

Techstack

proposals

  • Docker containers
  • Python 3.9
  • Django 4.0
  • DRF and/or Graphene-Django - API for mobile app/data export
  • django-allauth - login by Facebook/Google
  • audit -- audit data about changes
  • django-lifecycle - to request changes notification etc.
  • django-loginas
  • django-admin-env-notice
  • django-debug-toolbar
  • django-mail-queue
  • django-admin-reorder
  • python-decouple - loading settings from env
  • mypy, pre-commit, CI
  • postgres ~ 14
  • Tailwind ~ 3
  • tailwindcss/forms?
  • tailwindcss/typography?
  • htmx? or?
  • probably weback-based? parcel? or django-tailwind?

Plugin: Buddy&Pickup System

Buddy & Pickup System

Implemented as a plugin, both gonna be functionally pretty the same, so the codebase could share some parts. But still, needs to be implemented as two different Django apps.

Functionality

TBD

Plugin Configuration

The minimal configuration needed:

class BaseBuddyOrPickupConfiguration(BasePluginConfiguration):
    show_issuer_picture = BooleanField(default=False)
    show_issuer_gender = BooleanField(default=False)
    show_issuer_country = BooleanField(default=False)
    show_issuer_university = BooleanField(default=False)
    show_issuer_faculty = BooleanField(default=False)

    rolling_limit = PositiveSmallIntegerField(default=0)
    
    matching_policy = models.CharField(choices=...)

    class Meta:
        abstract = True


# https://en.wikipedia.org/wiki/Strategy_pattern
class MatchingPolicyProtocol(typing.Protocol):
    can_member_match: bool

    def limit_requests(
        qs: QuerySet['BaseRequest'],
        membership: SectionMembership
    ) -> QuerySet['BaseRequest']:
        ...

    def on_created_request(
        request: BaseRequest,
    ) -> None:
        ...

class ManualByEditorMatchingPolicy(MatchingPolicyProtocol):
    can_member_match = False

class ManualByMemberMatchingPolicy(MatchingPolicyProtocol):
    can_member_match = True

class SameFacultyMatchingPolicy(MatchingPolicyProtocol):
    ...

class LimitedSameFacultyMatchingPolicy(MatchingPolicyProtocol):
    ...
    # same faculty for N buddies
    # after N matches (to rolling_limit), faculty is not limited

class AutoMatchingPolicy(MatchingPolicyProtocol):
    ...
    # by internationals' selected interests
    # request will be matched to one from buddies automatically
    # (or the 'match' will be proposed to editor to confirm it)

Battleplan

  • generate plugins (apps, but with django-admin startplugin) for buddy_system and pickup_system
  • buddy could be the parent one (all needed there is subset of pickup)
  • define models for configuration ☝️ (pickup configuration should cover the preferred limitation for where field)
  • models for requests (state, FK issuer, FK related_section, matched_at, ...), probably with polyphormic as BaseRequest(Polymorphic) (all shared fields) -> BuddyRequest (empty) , PickupRequest (where, when)
  • make forms for submitting requests
  • make views to show all pending requests (respecting plugin configuration)
  • make dashboard view to show that request has been placed (incl. how many students is waiting)
  • define models for match (FK request, state, FK matched_by)
  • make view to show member all matches

Authentication with social accounts

Authentication with social accounts

  • at least with Facebook and Google, maybe Instagram, Twitter? all providers
  • find out OAuth2 with ESN Accounts #28 #27
  • django-allauth included into project, but definitely needs a lot of tweaks
  • would be nice to have a defined ESN section domain, so login in with [email protected] leads directly to concrete ESN section (editor role?)

Providers

Facebook

image
image
image

Google

image

Unify social icon templates and styles

  • social icons should have exactly one place of definition of colors/rounding/etc
  • currently is on multiple places on project
  • target is to have exactly one definition of templates and styles of all colors, borders and states for social icons
  • templates should have option to include custom text

Pull request preview deployment

  • would be nice to have possibility deploy fiesta directly from pull requests
  • the target domain will follow the branch name
  • only MR with specific MR will be deployed
  • removing that label would uninstall the installation
  • DB would use another schema
  • target deployment namespace would follow the PR branch name

Django Authenticator compatible with Nette\Passwords

Old Fiesta uses Nette\Security\Passwords for hashing/verifying passwords (leads to password_hash/password_verify with enabled bcrypt)

It's needed to reimplement it as Django Authenticator.

PoC:

#!/bin/env php
<?php
$pass = 'mypassword';

$hash = password_hash($pass, PASSWORD_BCRYPT);

echo $hash . PHP_EOL;

library bcrypt

#!/bin/env python3
import bcrypt

hashed = bytes(input(), 'utf-8')

password = b'mypassword'

if bcrypt.checkpw(password, hashed):
    print('matching')
else:
    print('not matching')

Solution

Profile status completeness on dashboard block

  • currently, the percentage is static
  • the value should follow the real completness of profile
  • template
  • be aware, UserProfileForm is dynamic form constructed from configurations of all sections, in which is specific user in membership
  • so the solution would be:
    1. construct the form via UserProfileForm.for_user(user: User)
    2. fill the form with instance of user
    3. compute the percentage of filled and unfilled fields in the form (not all fields, some defining subset of them)
    4. map the value to the color and display it

image

Section admins management

ESN Accounts = EA

  • president from EA = root admin
  • root admin can promote another admins or demote them
  • admin can demote other admins, but not root admin
  • for president switch, new root admin is logged in and do switch of them by removing the old one

Missing breadcrumbs on password change page

  • breadcrumbs are on all profile pages, but here is missing
  • would need more of investigation, since the view is from allauth and fiesta breadcrumbs probably need some kind of view support
  • html <title /> works from the same items as breadcrumbs, and the title works, so problem is only with displaying them
image

Revisit containers build process

  • current solution builds sequentially webpack, django and proxy containers, which is slow
  • would be nice to revisit the order and make the build parallel, at least from part of it
  • current dependencies:
    • django depends on webpack with webpack-stats.json which contains data about compiled assets
    • proxy depends on webpack with compiled assets, since these are served by proxy
    • proxy depends on django with collectstatic result, since these are also served by proxy
  • so the order is webpack, django, proxy
  • would be nice to have it more straighforward without magics with artifacts in deploy.yaml
  • maybe integration of Werf/similar tool would be the solution

Invalid Instagram DB field

Instagram username in table UserProfiles cannot be saved into DB probably because invalid regex check

WebpackBundleTracker with enabled SRI doesn't work with webpack-dev-server

webpack_1      | yarn run v1.22.17
webpack_1      | warning package.json: License should be a valid SPDX license expression
webpack_1      | $ webpack-dev-server --config webpack.dev.config.js
webpack_1      | BUILD_DIR=/usr/src/build
webpack_1      | PUBLIC_PATH=https://webpack.localhost/static/
webpack_1      | <i> [webpack-dev-server] Project is running at:
webpack_1      | <i> [webpack-dev-server] Loopback: http://localhost:8003/
webpack_1      | <i> [webpack-dev-server] Content not from webpack is served from '/usr/src/app/public' directory
webpack_1      | <i> [webpack-dev-server] 404s will fallback to '/index.html'
webpack_1      | <e> [webpack-dev-middleware] Error: ENOENT: no such file or directory, open '/usr/src/build/main.24a34978.css'
webpack_1      | <e>     at Object.openSync (node:fs:585:3)
webpack_1      | <e>     at Object.readFileSync (node:fs:453:35)
webpack_1      | <e>     at getSource (/usr/src/app/node_modules/webpack-bundle-tracker/lib/index.js:29:13)
webpack_1      | <e>     at /usr/src/app/node_modules/webpack-bundle-tracker/lib/index.js:154:53
webpack_1      | <e>     at /usr/src/app/node_modules/lodash.foreach/index.js:221:11
webpack_1      | <e>     at baseForOwn (/usr/src/app/node_modules/lodash.foreach/index.js:153:20)
webpack_1      | <e>     at /usr/src/app/node_modules/lodash.foreach/index.js:190:14
webpack_1      | <e>     at forEach (/usr/src/app/node_modules/lodash.foreach/index.js:290:10)
webpack_1      | <e>     at BundleTrackerPlugin._handleDone (/usr/src/app/node_modules/webpack-bundle-tracker/lib/index.js:147:5)
webpack_1      | <e>     at Hook.eval [as callAsync] (eval at create (/usr/src/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) {
webpack_1      | <e>   errno: -2,
webpack_1      | <e>   syscall: 'open',
webpack_1      | <e>   code: 'ENOENT',
webpack_1      | <e>   path: '/usr/src/build/main.24a34978.css'
webpack_1      | <e> }

User profile entry page

  • currently, user profile page entry is empty
  • based on the information in other tabs, decide what we want to include on the entry page
  • registration date? some basic statistics?
  • view and template
image

Plugins overview

Buena Fiesta gonna have plugins, when each section could set up which plugins (and in which configuration) they want to use.

Buddy System 🆗 #12

Buddies matching as we know it, international students write brief information about them and people from sections take them. Internationals s also fill their social network profiles, hobbies or interests.

Pickup System 🆗 #12

International students could ask for pickup from the place of arrival, so they fill place and time of arrival and section members can take them. Requests for pickup and buddy are joint and offered to members for taking them together.

ESNcard Orders 🔥 🆕 #7

System gonna support sections in evidence of ESNcard applications - international students could fill their application, upload passport pictures and observe the status of their application. Plugin gonna be able to generate bulk print materials to increase the efficiency of ESNcard making. Students who already have ESNcard could fill their card numbers into the system to get discounts.

Events ☝️ 🔥 🆕

Old Fiesta events module never really worked, did it? Buena Fiesta offers new events module including registration, integration with Google calendar, events notifications and participants exports.

Office Open Hours 🔥 🆕

Sections usually have an office with official open hours. This module can show them publicly on a pretty URL, directions to this office could be also filled (with address), so students can just click to Google/Apple map.

Checklists 🔥 🆕

Going on Erasmus isn't an easy thing, this module offers checklists for common situations during Erasmus: what to do before, after arrival, during mobility or what to fulfil after. Checklists are offered by Fiesta, but section can define their own.

Dashboard 🔥 🆕 #14

The entry point for the whole application -- really nice and really catchy! Conversion directly into buddy system, ESNcard or social profiles of sections. Video, photo album or anything amazing, what ESN sections creates and defines.

Webdesign

Something modern, light, in ESN colors. 😄

Inspiration

Resources

TODO

TODO

Active

Done


Generated by Github Action, please do not edit.
If you want to extract TODO into sub-issue, please include file:line somethere in the body text and add label todo.

User Profile Page

  • my profile -- shows the current state of the profile + 'edit my profile' button

  • change password -- shows Django form to change the password (or set in case of social account profile)

  • social accounts -- shows a list of current connected social accounts and offers to connect new one or disconnect

  • my stats -- TBD

  • delete my account -- shows confirmation page about (soft-) deleting the profile

  • help ("hotline")

  • PandaCoins

  • ??Notices

  • menu component

  • flex in tailwind

ESN Accounts & Sections Synchronisation

{
  "mail": "[email protected]",
  "sc": "CZ-BRNO-VUT",
  "first": "Josef",
  "last": "Kolář",
  "nationality": "CZ",
  "roles": [
    "Local.activeMember",
    "Local.eventCoordinator",
    "Local.regularBoardMember"
  ],
  "extended_roles": [
    "Local.alumnus:LV-RIGA-ESN",
    "Local.activeMember:CZ-BRNO-VUT",
    "Local.eventCoordinator:CZ-BRNO-VUT",
    "Local.regularBoardMember:CZ-BRNO-VUT"
  ],
  "picture": "https://accounts.esn.org/sites/default/files/avatars/2020-09/9f17b98072388c0eae4711192e776796ae8004e947a5b186f316bf0b06ec380b.jpg",
  "gender": "M",
  "section": "ESN VUT Brno",
  "country": "ESN Czech Republic",
  "uid": "thejoeejoee"
}
  • some of the synchronisation from ESN sources is needed:
    • https://accounts.esn.org/api/v2/sections
   {
  "label": "ESN VUT Brno",
  "code": "CZ-BRNO-VUT",
  "website": "https://esnvutbrno.cz/",
  "country": "Czechia",
  "cc": "CZ",
  "state": "active",
  "address": {
    "street_address": "Kolejní 2906/4\r\n612 00\r\nBrno\r\nCzechia",
    "locality": "Brno",
    "postal_code": "612 00",
    "country": "Czechia"
  },
  "cities": [
    {
      "name": "Brno",
      "cc": "CZ"
    }
  ],
  "geolocation": {
    "lat": "49.2311847",
    "lng": "16.5736247",
    "lat_sin": 0.7573505844605075,
    "lat_cos": 0.6530084932199027,
    "lng_rad": 0.2892643200048574
  },
  "university_name": "Brno University of Technology",
  "university_website": "https://www.vutbr.cz/en/",
  "updated": "1639496271",
  "facebook": "https://www.facebook.com/esn.vut.brno/",
  "instagram": "https://www.instagram.com/esnvutbrno/",
  "twitter": "",
  "video": "https://www.youtube.com/watch?v=pMPFoxjdXOI",
  "logo": "/sites/default/files/logos/CZ-BRNO-VUT.png"
}
  • https://accounts.esn.org/api/v2/countries
  {
    "label": "ESN Czech Republic",
    "website": "https://www.esncz.org/",
    "cc": "CZ",
    "country": "Czechia",
    "address": {
      "street_address": "Žerotínovo náměstí 9\r\n601 77\r\nBrno\r\nCzechia",
      "locality": "Brno",
      "postal_code": "601 77",
      "country": "Czechia"
    },
    "updated": "1638545216",
    "facebook": "https://www.facebook.com/esncz",
    "instagram": "https://www.instagram.com/esn_cz/",
    "twitter": "https://twitter.com/esn_cz?s=20",
    "video": "",
    "logo": "/sites/default/files/logos/CZ.png"
  }

Changelog creation

Add action that would run after merging PR into develop to create changelog. Use comitizen or google's release-please.

Migration process

New Buena Fiesta without old data would be total BS, so that's why.

Battleplan

  • new model definition
  • Django command to migrate from the legacy database
  • use raw Django cursor to legacy database
  • custom Database router to have legacy db read-only
  • use some kind of service layer to parameterize migration (static/dynamic data)
  • rehash user passwords? #1
  • limit migrated models? (data_user does have 11k rows currently)
  • profit 💸

Tailwind content scanning in Python files

Including python files in Tailwind content scanning paths ends with permission denied:

TAILWIND_CONTENT_PATH="/usr/src/fiesta/**/*.py"
buena-fiesta-webpack-1      | ERROR in ./src/css/main.css (./src/css/main.css.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/css/main.css)
buena-fiesta-webpack-1      | Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
buena-fiesta-webpack-1      | Error: EPERM: operation not permitted, open '/usr/src/fiesta/apps/sections/forms/plugin_configuration.py'
buena-fiesta-webpack-1      |  @ ./src/css/main.css
buena-fiesta-webpack-1      |  @ ./src/main.js 1:0-24
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | ERROR in ./src/css/main.css
buena-fiesta-webpack-1      | Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
buena-fiesta-webpack-1      | HookWebpackError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
buena-fiesta-webpack-1      | Error: EPERM: operation not permitted, open '/usr/src/fiesta/apps/sections/forms/plugin_configuration.py'
buena-fiesta-webpack-1      |     at tryRunOrWebpackError (/usr/src/app/node_modules/webpack/lib/HookWebpackError.js:88:9)
buena-fiesta-webpack-1      |     at __webpack_require_module__ (/usr/src/app/node_modules/webpack/lib/Compilation.js:5067:12)
buena-fiesta-webpack-1      |     at __webpack_require__ (/usr/src/app/node_modules/webpack/lib/Compilation.js:5024:18)
buena-fiesta-webpack-1      |     at /usr/src/app/node_modules/webpack/lib/Compilation.js:5095:20
buena-fiesta-webpack-1      |     at symbolIterator (/usr/src/app/node_modules/neo-async/async.js:3485:9)
buena-fiesta-webpack-1      |     at done (/usr/src/app/node_modules/neo-async/async.js:3527:9)
buena-fiesta-webpack-1      |     at Hook.eval [as callAsync] (eval at create (/usr/src/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
buena-fiesta-webpack-1      |     at /usr/src/app/node_modules/webpack/lib/Compilation.js:5002:43
buena-fiesta-webpack-1      |     at symbolIterator (/usr/src/app/node_modules/neo-async/async.js:3482:9)
buena-fiesta-webpack-1      |     at timesSync (/usr/src/app/node_modules/neo-async/async.js:2297:7)
buena-fiesta-webpack-1      | -- inner error --
buena-fiesta-webpack-1      | Error: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
buena-fiesta-webpack-1      | Error: EPERM: operation not permitted, open '/usr/src/fiesta/apps/sections/forms/plugin_configuration.py'
buena-fiesta-webpack-1      |     at Object.<anonymous> (/usr/src/app/node_modules/css-loader/dist/cjs.js!/usr/src/app/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!/usr/src/app/src/css/main.css:1:7)
buena-fiesta-webpack-1      |     at /usr/src/app/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:452:10
buena-fiesta-webpack-1      |     at Hook.eval [as call] (eval at create (/usr/src/app/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
buena-fiesta-webpack-1      |     at /usr/src/app/node_modules/webpack/lib/Compilation.js:5069:39
buena-fiesta-webpack-1      |     at tryRunOrWebpackError (/usr/src/app/node_modules/webpack/lib/HookWebpackError.js:83:7)
buena-fiesta-webpack-1      |     at __webpack_require_module__ (/usr/src/app/node_modules/webpack/lib/Compilation.js:5067:12)
buena-fiesta-webpack-1      |     at __webpack_require__ (/usr/src/app/node_modules/webpack/lib/Compilation.js:5024:18)
buena-fiesta-webpack-1      |     at /usr/src/app/node_modules/webpack/lib/Compilation.js:5095:20
buena-fiesta-webpack-1      |     at symbolIterator (/usr/src/app/node_modules/neo-async/async.js:3485:9)
buena-fiesta-webpack-1      |     at done (/usr/src/app/node_modules/neo-async/async.js:3527:9)
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | Generated code for /usr/src/app/node_modules/css-loader/dist/cjs.js!/usr/src/app/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!/usr/src/app/src/css/main.css
buena-fiesta-webpack-1      | 1 | throw new Error("Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):\nError: EPERM: operation not permitted, open '/usr/src/fiesta/apps/sections/forms/plugin_configuration.py'");
buena-fiesta-webpack-1      |  @ ./src/main.js 1:0-24
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | ERROR in webpack/runtime/hot module replacement
buena-fiesta-webpack-1      | EPERM: operation not permitted, open '/usr/src/app/node_modules/webpack/lib/hmr/HotModuleReplacement.runtime.js'
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | ERROR in webpack/runtime/hot module replacement
buena-fiesta-webpack-1      | EPERM: operation not permitted, open '/usr/src/app/node_modules/webpack/lib/hmr/HotModuleReplacement.runtime.js'
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | ERROR in webpack/runtime/jsonp chunk loading
buena-fiesta-webpack-1      | EPERM: operation not permitted, open '/usr/src/app/node_modules/webpack/lib/hmr/JavascriptHotModuleReplacement.runtime.js'
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | 3 errors have detailed information that is not shown.
buena-fiesta-webpack-1      | Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
buena-fiesta-webpack-1      |
buena-fiesta-webpack-1      | webpack 5.88.2 compiled with 5 errors in 4451 ms

HTML files during the same build completes successfully and Tailwind successfully scans thems. Even solution with manual globing fails, so the problem is not in the glob, but in the loading the py files through webpack loaders.

[How To] Populate DB with test/dummy data

I am building the project locally to test out the project and wanted to know how I can populate the database with dummy values. The place I am facing issue while completing my profile locally and the Universities and Faculty cannot be selected since there are no options to select from. Hence, I would like to know how I can pre-fill the database with test data. I have followed the instructions on the README.md file before starting the development server.

Colored avatar ring for roles

  • mainly for easier debugging received screenshots
  • small color ring around avatar to distinguish between member/editor/admin
  • probably gray for members, primary for editors and secondary for admins
  • activated for current membership role, outside of section space without ring

Plugin: ESNcard Applications

ESNcard Orders

Application Form

  • system gonna already have enough information about the student
  • ESNcard needs to have (already known data 👤, application form ✏️)
    • first and last name 👤
    • nationality 👤
    • date of birth ❓
    • studies at 👤
    • ESN Section 👤
    • valid since - application/export/issue date
    • photo of owner ✏️
  • model stores passport-sized photo and copy of all needed data from user profile

Photo Processing

  • photo needs to be cropped (and improved) to passport size (ESNcard does have space for 27x37mm photo)
  • dlib or opencv? SO solution

Data Export

  • for sections without interest in exporting print materials
  • probably CSV/Ex*el of card applications

Export Print Materials

  • based on a selected set of students, the plugin is able to render PDF files with
    • photos&labels - for debugging reasons
    • photos sized to ESNcard with a small label
    • labels sized to ESNcard -- used for printing on transparent foil
  • ESNcard materials PDF Generator

Battleplan:

  • plugin initialization and application form done in #26

Misc

  • card scanner? - barcode specs
  • validation endpoint: https://esncard.org/services/1.0/card.json?code=...

Use cases

Terminology

  • member is regular member of ESN section
  • editor is coordinator/supporter responsible for ESNcards/buddy system
  • admin is responsible (board) member of ESN section
  • international is international student as client of this system
  • plugin is a part of Fiesta responsible for one section agenda (buddy/pickup system, events, ESNcards, etc.)

User

  • can sign up by email&password
  • can sign up with Facebook, Google; Instagram? ESN Accounts?
  • does have confirmed email
  • does have roles in different ESN sections
  • can edit his profile, upload profile image, fill social network profiles, Telegram account
  • can delete his profile
  • can change his password
  • can control notifications (email/Telegram/Push?)
  • can export/connect events calendar of his section

International ⊆ User

  • can create buddy/pickup request (if enabled)
  • is notified of his fulfilled request
  • can see his matched buddy/pickup and write him
  • can apply for ESNcard by filling in needed info (if enabled)
  • can see events of his section and apply for them (if enabled)

Member ⊆ User

  • can see buddy/pickup requests and match them
  • can see his history of buddies

Editor ⊆ Member

  • can manually match buddy/pickup requests
  • can see ESNcard applications and generate print materials from them
  • can mark ESNcard application as issued
  • can create and edit events and see details/statistics about them
  • can approve memberships to his section
  • can edit all static pages of his section

Admin ⊆ Editor

  • can edit details of all users in his section
  • can transfer international/member to another section
  • can create membership for his section
  • can configure plugins in his sections
  • can manage membership roles in his section

Limit displayed social account providers

  • currently, the list of providers on login/sign up page is static and not rendered dynamically
  • has to be rendered dynamically same as it is on profile social accounts
  • ideally the icons/buttons are standalone templates, which could be used in the profile page>social accounts, so the design is matching
  • use allauth templatetags to load the providers:
{% load socialaccount %}
{% get_providers as socialaccount_providers %}
  • I'd keep the ESN accounts bigger, but that's for discussion definitely
image image image

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.