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

Resdesign UI #1

Merged
merged 17 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
DB_URI={{ db_uri }}
JWT_SECRET={{ jwt_secret }}
NEXT_PUBLIC_FRONTEND_BASE_URL={{ frontend_base_url }
NEXT_PUBLIC_BACKEND_BASE_URL={{ backend_base_url }}
GOOGLE_CLIENT_ID={{ google_client_id }}
GOOGLE_CLIENT_SECRET={{ google_client_secret }}
GOOGLE_REFRESH_TOKEN={{ google_refresh_token }}
GOOGLE_REDIRECT_URI={{ google_redirect_uri }}
GOOGLE_EMAIL={{ google_email }}
NEXT_PUBLIC_SERVER_BASE_URL={{ server_base_url }}

# All the environment variables mentioned above are required for the application to run.

Expand Down
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
22 changes: 11 additions & 11 deletions .github/docs/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Other (please describe):
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Other (please describe):

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn format
git add .
yarn lint
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn test
yarn build
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

## [0.1.0] - 2024-06-25

- First release
- First release

## [0.1.1] - 2024-10-08

### Added

- Added support for dark mode.
- Added support for dark mode.

## [1.0.0] - 2024-12-13

- Redesigned UI for better accessibility
- Added split expense methods
- Switched to bigger views for better UX
30 changes: 15 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ Loving NextJS Template, and want to be a part of team?

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting an issue
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
- Reporting an issue
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

Please take a moment to review this document in order to make the contribution process straightforward and effective for everyone involved.

## All changes happen through Pull Requests

Pull requests are the best way to propose changes. We actively welcome your pull requests:

- Fork the repo and create your branch from master.
- If you've added code that should be tested, add some tests' examples.
- If you've changed APIs, update the documentation.
- Issue that pull request!
- Fork the repo and create your branch from master.
- If you've added code that should be tested, add some tests' examples.
- If you've changed APIs, update the documentation.
- Issue that pull request!

## Local Development

Expand Down
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ Blend in the fun and let us handle your expenses.

## Features

- **Expense Tracking:** Easily record and categorize expenses during trips or outings.
- **Expense Splitting:** Automatically split expenses among participants and ensure fairness.
- **Real-time Updates:** View and manage expenses with real-time updates.
- **User-friendly Interface:** Intuitive design for easy navigation and use.
- **Expense Tracking:** Easily record and categorize expenses during trips or outings.
- **Expense Splitting:** Automatically split expenses among participants and ensure fairness.
- **Real-time Updates:** View and manage expenses with real-time updates.
- **User-friendly Interface:** Intuitive design for easy navigation and use.

## Technology Stack

- **Frontend:** NextJS, TypeScript
- **Backend** NextJS API Routes
- **Styling:** SASS
- **Database:** MongoDB
- **Frontend:** NextJS, TypeScript
- **Backend** NextJS API Routes
- **Styling:** SASS
- **Database:** MongoDB

## Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

- Node.js (>= 18.x)
- yarn
- Node.js (>= 18.x)
- yarn

### Installation

Expand Down Expand Up @@ -76,8 +76,8 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file

## Acknowledgments

- Special thanks to all contributors and the open-source community for their support.
- Inspired by the need for simple and efficient expense management during group activities.
- Special thanks to all contributors and the open-source community for their support.
- Inspired by the need for simple and efficient expense management during group activities.

## Contact

Expand All @@ -91,12 +91,12 @@ For any questions or feedback, please open an issue in the repository or reach o

## Acknowledgements

- [Next.js](https://nextjs.org)
- [TypeScript](https://www.typescriptlang.org)
- [MongoDB](https://www.mongodb.com)
- [Sass](https://sass-lang.com)
- [ESLint](https://eslint.org)
- [Prettier](https://prettier.io)
- [Husky](https://typicode.github.io/husky)
- [Commitlint](https://commitlint.js.org)
- [Jest](https://jestjs.io)
- [Next.js](https://nextjs.org)
- [TypeScript](https://www.typescriptlang.org)
- [MongoDB](https://www.mongodb.com)
- [Sass](https://sass-lang.com)
- [ESLint](https://eslint.org)
- [Prettier](https://prettier.io)
- [Husky](https://typicode.github.io/husky)
- [Commitlint](https://commitlint.js.org)
- [Jest](https://jestjs.io)
6 changes: 3 additions & 3 deletions client/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { api } from "@/connections";
import { AuthApi } from "@/connections";
import { admins } from "@/constants";
import { logger } from "@/log";
import { ServerSideAdminMiddleware, ServerSideAuthMiddleware } from "@/types";
Expand All @@ -15,7 +15,7 @@ export const authenticatedPage: ServerSideAuthMiddleware = async (
}
try {
const headers = { cookie: req.headers.cookie };
const { data: user } = await api.auth.verifyUserIfLoggedIn(headers);
const { data: user } = await AuthApi.verifyUserIfLoggedIn(headers);
if (user.name && user.phone) {
return onLoggedInAndOnboarded(user, headers);
} else {
Expand All @@ -38,7 +38,7 @@ export const adminPage: ServerSideAdminMiddleware = async (
}
try {
const headers = { cookie: req.headers.cookie };
const { data: user } = await api.auth.verifyUserIfLoggedIn(headers);
const { data: user } = await AuthApi.verifyUserIfLoggedIn(headers);
if (admins.includes(user.email)) {
return onAdmin(user, headers);
} else {
Expand Down
19 changes: 8 additions & 11 deletions components/Expenses/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,15 @@ const Expense: React.FC<IExpenseProps> = ({
className={classes("")}
onClick={() => setOpenViewExpensePopup(true)}
>
<div className={classes("-details")}>
<Typography className={classes("-title")}>
{title}
</Typography>
<Typography size="sm">
{moment(paidOn ?? createdAt).format("MMM DD, YYYY")}
</Typography>
</div>
<div className={classes("-paid")}>
<Typography className={classes("-date")}>
{moment(paidOn ?? createdAt).format("MMM DD, YYYY")}
</Typography>
<Typography className={classes("-title")}>{title}</Typography>
<Typography className={classes("-amount")}>
{paidBy.name || paidBy.email.slice(0, 7) + "..."}
<Typography size="sm">paid {amount}</Typography>
</div>
{" paid "}
{amount}
</Typography>
</div>
{openViewExpensePopup ? (
<ViewExpense
Expand Down
Loading
Loading