{"id":27105082,"url":"https://github.com/mohameddev19/finder-app","last_synced_at":"2025-10-20T08:35:31.412Z","repository":{"id":285701436,"uuid":"959040539","full_name":"mohameddev19/finder-app","owner":"mohameddev19","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-02T07:13:53.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T08:24:34.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohameddev19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-02T07:07:37.000Z","updated_at":"2025-04-02T07:13:56.000Z","dependencies_parsed_at":"2025-04-02T08:34:45.361Z","dependency_job_id":null,"html_url":"https://github.com/mohameddev19/finder-app","commit_stats":null,"previous_names":["mohameddev19/finder-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohameddev19%2Ffinder-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohameddev19%2Ffinder-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohameddev19%2Ffinder-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohameddev19%2Ffinder-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohameddev19","download_url":"https://codeload.github.com/mohameddev19/finder-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247534480,"owners_count":20954565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-06T18:36:27.372Z","updated_at":"2025-10-20T08:35:26.381Z","avatar_url":"https://github.com/mohameddev19.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finder App\n\n## Project Goal\n\nThe Finder App aims to assist families and authorities in locating missing persons and tracking released prisoners. It provides a platform for:\n\n1.  **Reporting Missing Persons:** Allowing users (family members, friends) to submit information about individuals who are missing.\n2.  **Searching for Missing Persons:** Enabling users to search the database for missing individuals based on various criteria.\n3.  **Managing Released Prisoners:** Providing a secure interface for authorized personnel to record and manage information about released prisoners, potentially aiding in investigations or monitoring.\n4.  **Connecting Information:** Facilitating the potential connection between missing persons reports and released prisoner data where legally and ethically permissible.\n\n## Technology Stack\n\n-   **Framework:** [Next.js](https://nextjs.org/) (React framework)\n-   **UI Library:** [Mantine](https://mantine.dev/)\n-   **Database ORM:** [Drizzle ORM](https://orm.drizzle.team/)\n-   **Database Provider:** [Neon](https://neon.tech/) (Serverless Postgres)\n-   **Language:** [TypeScript](https://www.typescriptlang.org/)\n-   **Authentication:** JWT (JSON Web Tokens)\n\n## Project Structure\n\n```\nfinder-app/\n├── middleware.ts           # Handles authentication and route protection\n├── next.config.mjs         # Next.js configuration\n├── package.json            # Project dependencies and scripts\n├── postcss.config.mjs      # PostCSS configuration (for Mantine)\n├── public/                 # Static assets (images, fonts, etc.)\n├── src/\n│   ├── app/                # Next.js App Router pages and layouts\n│   │   ├── api/            # API route handlers\n│   │   │   ├── auth/       # Authentication endpoints (login, register, logout)\n│   │   │   └── ...         # Other API endpoints (prisoners, missing persons)\n│   │   ├── (auth)/         # Route group for authentication pages (login, register)\n│   │   ├── (main)/         # Route group for main application pages\n│   │   └── layout.tsx      # Root layout\n│   ├── components/         # Reusable UI components\n│   ├── db/                 # Drizzle ORM setup\n│   │   ├── migrate.ts      # Database migration script\n│   │   ├── schema.ts       # Database table definitions\n│   │   └── index.ts        # Drizzle client instance\n│   ├── lib/                # Utility functions and helpers\n│   │   └── auth.ts         # JWT token verification and user session logic\n│   └── styles/             # Global styles (if any)\n├── tsconfig.json           # TypeScript configuration\n└── drizzle.config.ts       # Drizzle configuration\n```\n\n## Key Mechanisms\n\n-   **Authentication:**\n    -   Uses JWT stored in cookies (`finder_token`).\n    -   `middleware.ts` protects routes based on authentication status and user type (e.g., 'authority').\n    -   `/api/auth/register`, `/api/auth/login`, `/api/auth/logout` handle user registration, login, and logout.\n-   **Database:**\n    -   Managed by Drizzle ORM with schema defined in `src/db/schema.ts`.\n    -   Connects to a Neon serverless Postgres database.\n    -   Migrations are handled using `drizzle-kit`.\n-   **API Routes:**\n    -   Located in `src/app/api/`.\n    -   Handle data fetching, mutations, and interactions with the database.\n-   **Frontend:**\n    -   Built with React and Mantine components.\n    -   Uses Next.js App Router for routing and server-side rendering/static generation.\n\n## Getting Started\n\n1.  **Clone the repository:**\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd finder-app\n    ```\n2.  **Install dependencies:**\n    ```bash\n    npm install\n    # or\n    yarn install\n    # or\n    pnpm install\n    ```\n3.  **Set up environment variables:**\n    -   Create a `.env.local` file in the root directory.\n    -   Add the following variables:\n        ```env\n        DATABASE_URL=\"your_neon_database_connection_string\"\n        JWT_SECRET=\"your_strong_jwt_secret_key\"\n        ```\n    -   Replace the placeholder values with your actual Neon database URL and a secure JWT secret.\n4.  **Run database migrations:**\n    ```bash\n    npm run db:push\n    # or\n    yarn db:push\n    # or\n    pnpm db:push\n    ```\n5.  **Run the development server:**\n    ```bash\n    npm run dev\n    # or\n    yarn dev\n    # or\n    pnpm dev\n    ```\n    Open [http://localhost:3000](http://localhost:3000) in your browser.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1.  **Fork the repository.**\n2.  **Create a new branch** for your feature or bug fix: `git checkout -b feature/your-feature-name` or `bugfix/your-bug-fix-name`.\n3.  **Make your changes.** Ensure code follows existing patterns and includes tests where applicable.\n4.  **Lint your code:** Run `npm run lint` (or yarn/pnpm equivalent) and fix any errors.\n5.  **Commit your changes** with clear and concise messages.\n6.  **Push your branch** to your fork.\n7.  **Open a Pull Request** against the main repository's `main` branch. Provide a detailed description of your changes.\n\nWe appreciate your help in improving the Finder App!\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohameddev19%2Ffinder-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohameddev19%2Ffinder-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohameddev19%2Ffinder-app/lists"}