Giter VIP home page Giter VIP logo

memoir's Introduction

Memoir

Warning

Backend API has not been deployed yet. Frontend deployment will not work as expected.

791shots_so (1)

Memoir is a web editor for journaling and documenting your reflections.

MVP Features:

  1. User Registration and Profile:
    • Users can sign up using their email or social media accounts.
    • User profiles where they can set preferences, choose a display name, and customize their experience.
  2. Daily Journal Entry:
    • A simple and intuitive interface for users to write their daily thoughts, reflections, or experiences.
    • Option to include images or multimedia elements to enhance the journal entries.
  3. Daily Prompts/Questions:
    • Provide a set of daily prompts or questions that users can choose to answer in their journal entries.
    • Users can opt to receive a daily notification suggesting a prompt to inspire their journaling.
  4. Resume Page:
    • A page summarizing the user's recent journal entries in a timeline format.
    • Quick access to past entries for reflection and tracking personal growth.
  5. Basic Analytics:
    • Simple analytics to track streaks, average word count, and frequency of journaling.
    • Encourage users with positive feedback for achieving milestones.
  6. Search and Tagging System:
    • A search functionality to find specific entries or topics.
    • Users can tag entries with keywords for easy categorization and future reference.

memoir's People

Contributors

huilensolis avatar

Stargazers

Arjun avatar Jes015 avatar Iñigo Taibo avatar  avatar

Watchers

 avatar

memoir's Issues

feature(api): add user account re-active when user signs in

we detect if a user account is active or inactive by saving a date on a column on the user table called end_date, if the value of end_date is null, it means the account is active, if not, it is a deleted or inactive account.

when a user decides to delete his account, we give him 30 days to sign in again, and if he does, his account will be restored.
for that, what we need to do is:

  • When the user signs in successfully, we check if the account is inactive
  • if the account was inactive, we re-active it again, by setting the user column end_date to null
  • if the account is active, we continue as usual.

feature(api): add @elysiajs/cron to delete users after they have deleted their account for 30 days

Elysia docs: https://elysiajs.com/plugins/cron

  • Install @elysiajs/cron with bun add @elysiajs/cron
  • Create a plugin for handling users deleting
  • Set timer to 24hs, so we run the cron once each day
  • On the cron function, look for all users that contain end date area with a date and not null
  • Delete all users with end_date set to a date older than 30 days from new today
  • add that plugin to the server, adding app.use(plugin) on src/app.ts

feature(api): add roles

add role 'admin' and 'user'

  • create table roles
  • always create a role 'user' and a 'admin'
  • assign roles to the user

feature(api): add banning system

after #50 is completed, we need to have a way to ban users from using the application if the admin decides to do so

  • add an endpoint in /user to ban users
  • check for the request authenticated user role
  • if the role is admin, ban the target user by deactivating their account with UserProvider.delete()
  • if not, reject the request

feature(app): fix turbo scripts

right now, you can't run turbo setup or turbo clean-up from the root directory, you need to move into /apps/api to make it work.

  • add turbo.json to apps/api/
  • add setup script
  • add clean up script
  • make dev depend on setup

refactor(api): migrate set up and clean up scripts into a ts file

the set-up script has two errors

  • the migration script never exists in the process after it finishes the migration
  • the set up script never awaits for the docker database container to turn on and open the database connection
    so, we end with a script that turns on the docker container, and tries to migrate, but encounters an error because the database is not ready for connections yet, and if you run turbo run migrate, it never exits the process.

the solution can be to create a setup.ts file, where we:

  • run docker compose up
  • await until the database connection is ready
  • generate the migration files for drizzle (running drizzle-kit generate:pg)
  • run the migration
  • exit the migration process after has been 5 seconds
  • exit the process

feat(api): add "clean" script to package json

when we work locally using docker volumes for the Postgresql database, we often need to delete the volumes and containers, so we can start with a clean database the next time we run "bun run dev" or "turbo dev".

  • Add the "clean" script to the package.json on the API folder
  • When the command is executed, clean up the docker container and volume

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.