{"id":21964584,"url":"https://github.com/apollo-level2-web-dev/foundx-server","last_synced_at":"2025-07-30T13:33:42.618Z","repository":{"id":256211864,"uuid":"851473789","full_name":"Apollo-Level2-Web-Dev/FoundX-Server","owner":"Apollo-Level2-Web-Dev","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-23T05:03:34.000Z","size":138,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-07T11:37:15.647Z","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/Apollo-Level2-Web-Dev.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":"2024-09-03T06:55:14.000Z","updated_at":"2025-05-15T08:29:28.000Z","dependencies_parsed_at":"2024-09-09T16:42:08.542Z","dependency_job_id":"955ca9cb-055e-4847-a2a9-e77a53bbae0f","html_url":"https://github.com/Apollo-Level2-Web-Dev/FoundX-Server","commit_stats":null,"previous_names":["apollo-level2-web-dev/foundx-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Apollo-Level2-Web-Dev/FoundX-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Level2-Web-Dev%2FFoundX-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Level2-Web-Dev%2FFoundX-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Level2-Web-Dev%2FFoundX-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Level2-Web-Dev%2FFoundX-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Apollo-Level2-Web-Dev","download_url":"https://codeload.github.com/Apollo-Level2-Web-Dev/FoundX-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Level2-Web-Dev%2FFoundX-Server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267875625,"owners_count":24158781,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-29T12:25:36.601Z","updated_at":"2025-07-30T13:33:42.115Z","avatar_url":"https://github.com/Apollo-Level2-Web-Dev.png","language":"TypeScript","readme":"# **Project Setup and Configuration Guide**\n\n## **Description**\n\nThis guide provides a detailed step-by-step process to clone, install, configure, and run the project. It covers everything from setting up environment variables, including database URI, Cloudinary account, and Gmail app password, to running the project in development and production modes. Follow these instructions to seamlessly get your project up and running.\n\n---\n\n# Installation Guide\n\n## **1. Clone the Project Repository**\n\nFirst, you need to clone the project repository from your version control platform (e.g., GitHub, GitLab).\n\nOpen your terminal and execute the following command:\n\n```bash\ngit clone \u003crepository-url\u003e\n```\n\nReplace `\u003crepository-url\u003e` with the actual URL of your repository.\n\n## **2. Navigate to the Project Directory**\n\nOnce the repository is cloned, navigate to the project directory:\n\n```bash\ncd project-name\n```\n\nReplace `project-name` with the name of the directory created by the `git clone` command.\n\n## **3. Install All Packages**\n\nNext, install all the required dependencies listed in the `package.json` file. You can use either Yarn or npm:\n\nWith **Yarn**:\n\n```bash\nyarn install\n```\n\nOr with **npm**:\n\n```bash\nnpm install\n```\n\nThis command will install all the necessary packages.\n\n## **4. Configure Environment Variables**\n\n### **4.1 Rename the `.env.example` File**\n\nThe project includes an `.env.example` file that contains example environment variables. Rename this file to `.env`:\n\n```bash\nmv .env.example .env\n```\n\nThis will create a `.env` file where you will store your actual environment variables.\n\n### **4.2 Retrieve the MongoDB Connection URI**\n\nSince you already have a MongoDB cluster and user set up, retrieve the connection string from MongoDB Atlas:\n\n1. **Log in to MongoDB Atlas:**\n   - Go to [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) and log in with your credentials.\n\n2. **Select Your Cluster:**\n   - Once logged in, you’ll see your clusters on the dashboard. Click on the cluster you’ve already created.\n\n3. **Connect to Your Cluster:**\n   - On the cluster page, click the \"Connect\" button.\n\n4. **Choose a Connection Method:**\n   - Select **\"Connect your application.\"**\n\n5. **Select Driver and Version:**\n   - Ensure the \"Driver\" dropdown is set to **\"Node.js\"** and the version is appropriate.\n\n6. **Copy the Connection String:**\n   - MongoDB Atlas will display a connection string like this:\n\n   ```plaintext\n   mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster0.xxxxx.mongodb.net/\u003cdbname\u003e?retryWrites=true\u0026w=majority\n   ```\n\n7. **Replace Placeholders in the Connection String:**\n   - Replace `\u003cusername\u003e` with your MongoDB username.\n   - Replace `\u003cpassword\u003e` with your MongoDB user's password.\n   - Replace `\u003cdbname\u003e` with the name of the database you want to connect to.\n\n   For example:\n\n   ```plaintext\n   mongodb+srv://admin:Admin123456@cluster0.xxxxx.mongodb.net/lost-and-found?retryWrites=true\u0026w=majority\n   ```\n\n8. **Add the Database URI to Your `.env` File**\n\n   Open the `.env` file in the project root and add the following line:\n\n   ```bash\n   DB_URL=mongodb+srv://admin:Admin123456@cluster0.xxxxx.mongodb.net/lost-and-found?retryWrites=true\u0026w=majority\n   ```\n\n   Replace the URI with your actual MongoDB connection string.\n\n### **4.3 Set Up Cloudinary Account and Credentials**\n\nCloudinary is used for managing and delivering images. To set it up:\n\n1. Visit [Cloudinary](https://cloudinary.com/).\n2. Sign up or log in to your account.\n3. Go to the Cloudinary Dashboard.\n4. Note down your `Cloud Name`, `API Key`, and `API Secret`.\n\nAdd these credentials to your `.env` file:\n\n```bash\nCLOUDINARY_CLOUD_NAME=\u003cyour-cloud-name\u003e\nCLOUDINARY_API_KEY=\u003cyour-api-key\u003e\nCLOUDINARY_API_SECRET=\u003cyour-api-secret\u003e\n```\n\nReplace `\u003cyour-cloud-name\u003e`, `\u003cyour-api-key\u003e`, and `\u003cyour-api-secret\u003e` with your Cloudinary account details.\n\n### **4.4 Set Up Gmail App Password**\n\nTo send emails through your Gmail account, you need to generate an app password:\n\n1. Go to your [Google Account Security Settings](https://myaccount.google.com/security).\n2. Under \"Signing in to Google,\" enable 2-Step Verification.\n3. Once 2-Step Verification is enabled, go back to the Security page and click on \"App passwords.\"\n4. Select \"Mail\" as the app and your device type, then generate the app password.\n5. Copy the generated password.\n\nAdd your Gmail credentials to the `.env` file:\n\n```bash\nSENDER_EMAIL=\u003cyour-email\u003e\nSENDER_APP_PASS=\u003cyour-app-password\u003e\n```\n\nReplace `\u003cyour-email\u003e` with your Gmail address and `\u003cyour-app-password\u003e` with the app password you generated.\n\n### **4.5 Add Remaining Environment Variables**\n\nComplete your `.env` file with the following variables:\n\n```bash\nNODE_ENV=development\nPORT=3000\nBCRYPT_SALT_ROUNDS=12\nJWT_ACCESS_SECRET=secret\nJWT_ACCESS_EXPIRES_IN=7d\nJWT_REFRESH_SECRET=refreshsecret\nJWT_REFRESH_EXPIRES_IN=1y\nADMIN_EMAIL=admin@gmail.com\nADMIN_PASSWORD=123456\nADMIN_MOBILE_NUMBER=1234567890\nADMIN_PROFILE_PHOTO=https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png\n```\n\n## **5. Run the Project**\n\nAfter setting up the environment variables, you can run the project.\n\n### **5.1 Run in Development Mode**\n\nTo start the project in development mode, run:\n\nWith **Yarn**:\n\n```bash\nyarn dev\n```\n\nOr with **npm**:\n\n```bash\nnpm run dev\n```\n\nThis will start the development server with hot-reloading enabled.\n\n### **5.2 Run in Production Mode**\n\nTo start the project in production mode:\n\n1. **Build the Project:**\n\n   With **Yarn**:\n\n   ```bash\n   yarn build\n   ```\n\n   Or with **npm**:\n\n   ```bash\n   npm run build\n   ```\n\n2. **Start the Server:**\n\n   With **Yarn**:\n\n   ```bash\n   yarn start\n   ```\n\n   Or with **npm**:\n\n   ```bash\n   npm start\n   ```\n\n## **6. Access the Application**\n\nOnce the server is running, you can access the application in your browser by visiting:\n\n```bash\nhttp://localhost:5000\n```\n\nThis guide should help you set up, configure, and run your project seamlessly. If you encounter any issues or need further assistance, feel free to ask!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollo-level2-web-dev%2Ffoundx-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapollo-level2-web-dev%2Ffoundx-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollo-level2-web-dev%2Ffoundx-server/lists"}