An open API service indexing awesome lists of open source software.

https://github.com/sachin-bi/silent-feedback-next-app

SilentFeedback is a platform enabling people to share honest, anonymous feedback effortlessly . Real-time feedback exchanges in a streamlined, user-friendly environment.
https://github.com/sachin-bi/silent-feedback-next-app

mongodb nextjs

Last synced: 2 months ago
JSON representation

SilentFeedback is a platform enabling people to share honest, anonymous feedback effortlessly . Real-time feedback exchanges in a streamlined, user-friendly environment.

Awesome Lists containing this project

README

        

---

## SilentFeedback Project Documentation

### Overview
SilentFeedback is a feedback platform enabling users to give and receive anonymous messages in a secure and streamlined environment. This app is built with Next.js and the MERN stack (MongoDB, Express, React, and Node.js), ensuring a powerful, scalable experience.

---

## πŸ“Έ Screenshots

### Home Page
![Home Page](./screenshots/landing_page.png)

### Verified User Dashboard
![Job Description Input](./screenshots/dashboard-after-msg.png)

### Anonymous Person Sending Message To Verified User
![Generated Interview Questions](./screenshots/anonymous-msg-sender-pg.png)

---

### Key Features:
- **Anonymity First**: Allow users to share genuine feedback without revealing identities.
- **Seamless Experience**: Optimized with Next.js and Tailwind CSS for speed and elegance.
- **Real-Time Messaging**: Efficiently powered by the MERN stack and secure backend.

### Directory Structure

```plaintext
src
β”œβ”€β”€β”€app
β”‚ β”œβ”€β”€β”€(app) - Main application files
β”‚ β”œβ”€β”€β”€(auth) - Authentication-related routes
β”‚ β”‚ β”œβ”€β”€β”€sign-in - User sign-in page
β”‚ β”‚ β”œβ”€β”€β”€sign-up - User sign-up page
β”‚ β”‚ └───verify/[username] - Account verification
β”‚ β”œβ”€β”€β”€api - Backend API routes
β”‚ β”‚ β”œβ”€β”€β”€auth/[...nextauth] - Authentication handling via NextAuth
β”‚ β”‚ β”œβ”€β”€β”€accept-messages - Accept feedback messages
β”‚ β”‚ β”œβ”€β”€β”€delete-message/[messageid] - Delete specific messages
β”‚ β”‚ β”œβ”€β”€β”€get-messages - Retrieve user messages
β”‚ β”‚ β”œβ”€β”€β”€send-message - Route for sending messages
β”‚ β”‚ β”œβ”€β”€β”€check-username-unique - Check if username is unique
β”‚ β”‚ β”œβ”€β”€β”€sign-up - Registration API route
β”‚ β”‚ β”œβ”€β”€β”€suggest-messages - Suggestions for messages
β”‚ β”‚ └───verify-code - Email/code verification
β”‚ β”œβ”€β”€β”€fonts - Custom fonts for the UI
β”‚ └───u/[username] - User profiles
β”œβ”€β”€β”€components
β”‚ └───ui - UI components like buttons, forms, etc.
β”œβ”€β”€β”€context - Context providers, e.g., AuthProvider for user authentication
β”œβ”€β”€β”€helpers - Helper functions for common operations
β”œβ”€β”€β”€hooks - Custom React hooks for reusable logic
β”œβ”€β”€β”€lib - Libraries for database connections or API clients
β”œβ”€β”€β”€model - Database models for MongoDB collections
β”œβ”€β”€β”€schemas - Validation schemas for data consistency
└───types - Type definitions for TypeScript

```

### Key Functional Modules

- **Authentication** (`app/(auth)`): Handles user login, signup, and account verification.
- **API** (`app/api`): Defines all backend routes for processing feedback, managing accounts, and interacting with the MongoDB database.
- **User Profiles** (`app/u/[username]`): Each user has a profile page where they can view their feedback.
- **Reusable Components** (`components/ui`): Pre-built UI elements for consistent design.
- **Context** (`context`): Context providers, especially for authentication, allowing global access to user data.
- **Database Models** (`model`): MongoDB models for schema-based interaction with the database, ensuring data integrity.

### Getting Started

1. **Installation**: Clone the repo, then run `npm install` to install dependencies.
2. **Environment Setup**: Create a `.env` file with necessary environment variables (database URL, NextAuth secrets, etc.).
3. **Running Locally**: Use `npm run dev` to start the development server at `http://localhost:3000`.
4. **Build and Deploy**: Run `npm run build` for production builds. Deploy using platforms like Vercel for serverless deployment.

---

## For next-auth setup

* should have knowledge of provider and callbacks.
* set up next auth.

## Lucide-react
* there are many icons (available here)

## ui.shadcn
* components used from shadcn
* [docs](https://ui.shadcn.com/docs/components)

## usehooks-ts
* useDebounceValue
* [docs](https://usehooks-ts.com/react-hook/use-debounce-value)

## react-hook-form
* form n zod
* [docs](https://www.react-hook-form.com/get-started)
* [watch/setValue/useForm](https://react-hook-form.com/docs/useform/watch) -> for toggle input
* usecallbackhook -> use