Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Category CRUD APIs✨ #12

Merged
merged 26 commits into from
Nov 13, 2024
Merged

Conversation

shivamvijaywargi
Copy link
Contributor

@shivamvijaywargi shivamvijaywargi commented Nov 12, 2024

This pull request includes several updates and improvements to various parts of the codebase, including configuration files, workflows, and application logic. The most important changes are grouped by their themes below.

Configuration and Workflow Updates:

  • Updated .github/dependabot.yml to remove unnecessary quotes and improve readability.
  • Added new steps to the Node.js CI workflow in .github/workflows/bun.js.yml to check types and run ESLint.
  • Added Husky pre-commit hooks to run type checks and linting in .husky/pre-commit.
  • Added Bun support in .vscode/launch.json for debugging and .vscode/settings.json for default JavaScript Debug Terminal settings. [1] [2]

Application Logic Enhancements:

  • Added categoryRouter to the routes in src/app.ts.
  • Introduced a new helper function generateMetadata in src/common/helpers/metadata.helper.ts for pagination metadata.
  • Defined metadataSchema and related types in src/common/schema/metadata.schema.ts for pagination metadata validation.
  • Added constants for pagination and sorting in src/common/utils/constants.ts.

Database Schema Changes:

  • Added new types and tables in src/db/migrations/0000_smart_firebrand.sql for managing accounts, activities, categories, expenses, groups, sessions, splits, users, and user-group relationships.
  • Removed outdated migration scripts src/db/migrations/0000_open_black_crow.sql, 0001_nasty_cobalt_man.sql, and 0002_equal_grandmaster.sql. [1] [2] [3]

Dependency and Script Updates:

  • Updated package.json to include new scripts for Husky and type checking, and added husky and lint-staged as dependencies. [1] [2] [3]

Code Style and Linting:

  • Updated ESLint configuration in eslint.config.mjs to include new rules and override settings for specific folders.

To drop db use a GUI and if you get error saying already in use by some
other user then run the following command in psql shell using your admin
account
-- Connect to the PostgreSQL server using a superuser account
psql -U postgres
-- Terminate all connections to the database
SELECT pg_terminate_backend(pg_stat_activity.pid)FROM
pg_stat_activityWHERE pg_stat_activity.datname =
'finance-management-api'  AND pid <> pg_backend_pid();
-- Drop the databaseDROP DATABASE "finance-management-api";
@shivamvijaywargi shivamvijaywargi self-assigned this Nov 12, 2024
@shivamvijaywargi shivamvijaywargi linked an issue Nov 12, 2024 that may be closed by this pull request
@shivamvijaywargi shivamvijaywargi removed the request for review from sai2yeshwanth November 13, 2024 06:59
@shivamvijaywargi shivamvijaywargi merged commit 2218a80 into main Nov 13, 2024
3 checks passed
@shivamvijaywargi shivamvijaywargi added this to the Implement CRUD for category and group milestone Nov 17, 2024
@shivamvijaywargi shivamvijaywargi modified the milestones: Implement CRUD for category and group, V1.0 Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRUD Category APIs
2 participants