Coder Social home page Coder Social logo

emranprojects / sahabee Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 9.14 MB

Let the good times roll!

Home Page: https://sahabee.ir

License: GNU General Public License v3.0

Shell 5.14% Dockerfile 0.57% Python 48.28% JavaScript 43.08% HTML 1.92% Jinja 0.56% CSS 0.46%
rollcall timesheet timesheet-management

sahabee's Introduction

SahaBee

Master Pipeline Coverage Code Smells Bugs
A simple API for rollcalling during the remote-work.

What problem does SahaBee solve?

We are currently remote working because of the corona virus. These days it's a regular task for us to report our work-times to the company as a standard excel sheet.
I found it boring to fill a timesheet excel every time; so decided to develop a small (yet powerful) API to just call it and get the reports automatically.

Contribution

Contributions of any kind, especially pull requests, are appreciated. Feel free to make Pull Requests to this repo.
Also, you can take look at open issues; some of them are tagged as good first issue, which denotes the issue is a good fit for the first contributions, with much less complications or need of domain knowledge.
For more details, see SahaBee's contributing guide.

sahabee's People

Contributors

alireza73uk avatar dependabot[bot] avatar emranbm avatar yaser62 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

alireza73uk

sahabee's Issues

Rollcall button toggle for exit/enter

In the dashboard, it's better to determine what the rollcall button is supposed to emit: An enter event or an exit?
Note that it's just a UI/UX facility since there is no difference between Rollout objects at the backend.

Add ability to connect existing account to Google

For current users, it's vital to be able to connect their current SahaBee account to their Google account, so can take the benefits of the future Google OAuth login feature.
For this reason, these features are needed, in order:

  • Ability to delete account. So can undo any unintentional Google login.
  • Ability to connect the current SahaBee account to a Google account. So that the future logins can be performed through Google.

Specify time for rollcalling

In the dashboard, users should be able to determine the time of roll call.
Currently, it's only a single button to rollcall with the current time.
It's already implemented at the API level to send the time for rollcalling.

Connect to Sentry

It's needed to connect SahaBee to Sentry for error tracking.
Preferably for both backend and frontend.

Backup restore fails to reload an auto-generated UserDetail

During the test run of the restore procedure, it failed to restore this backup on production.
So I manually destroyed the production data and restored a modified* version of the backup.
*By modification, I mean removing the problematic UserDetail from the backup file.
It didn't get reproduced locally but was reproducing at production, even with a clean database.

Nice form errors

Currently, when submitting a form (e.g. login) the error details text is toasted rawly.
It's better to show them near the corresponding error-faced fields.

UserDetails edit page

Users should be able to see and edit their details (described by backend model UserDetail).

On restore failure, last database should be replaced back

The current restore procedure contains two steps:

  1. Flushing the DB. (i.e. emptying the whole database)
  2. Restoring the previous backup.

So, if step 2 is failed, we face an empty database!
It's important to back up the last DB file (i.e. db.sqlite) and replace it back to the position if the restore procedure failed for any reason.

Fix email sending authentication issue

There is a celery task that emails timesheets periodically. Currently, it fails due to the change to the mail server authentication system. It may or may not be fixed by replacing the new credentials.
The error log:

[2022-01-11 23:00:01,811: ERROR/ForkPoolWorker-2] Task TASK_SEND_ACTIVE_TIMESHEETS[3e6e4745-c225-432b-93bc-3e9b0c6e2e93] raised unexpected: SMTPAuthenticationError(535, b'5.7.8 Error: authentication fail
ed: authentication failure')
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/sahabee/rollcall/tasks.py", line 32, in send_active_timesheets
    _send_user_timesheet(user)
  File "/sahabee/rollcall/tasks.py", line 72, in _send_user_timesheet
    message.send()
  File "/usr/local/lib/python3.8/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/usr/local/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
  File "/usr/local/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 69, in open
    self.connection.login(self.username, self.password)
  File "/usr/local/lib/python3.8/smtplib.py", line 734, in login
    raise last_exception
  File "/usr/local/lib/python3.8/smtplib.py", line 723, in login
    (code, resp) = self.auth(
  File "/usr/local/lib/python3.8/smtplib.py", line 646, in auth
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Error: authentication failed: authentication failure')

Remove UserDetails API endpoint

There is no need for the user to be able to deal with user details.
The UserDetailViewSet and corresponding codes, should be removed.

CC manager when emailing the timesheet

  • UserDetail should contain also the manager's email address. (Backend)
  • Manager email should be settable on the profile page. (Frontend)
  • Manager should be in CCs of the timesheet email. (Backend)

Prevent more than MAX rollouts per day

Currently, the timesheet format doesn't let more than 6 rollouts. It should be validated at the backend not to save more than 6 rollouts in a single day.

Switch to Postgres

Currently, SahaBee is using an SQLite database, which is better to be replaced with PostgreSQL.

Clean docker cache periodically

Currently, the pulled images on deployments remain in the production server forever.
There should be a corn job to clean docker cache (i.e. docker system prune -a) periodically.

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.