{"_id":"@carlasanudo44/booking-app","name":"@carlasanudo44/booking-app","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@carlasanudo44/booking-app","version":"1.0.0","type":"module","description":"Booking system library with authentication and booking management","main":"./dist/lib/index.js","types":"./dist/lib/index.d.ts","exports":{".":{"import":"./dist/lib/index.js","types":"./dist/lib/index.d.ts"}},"scripts":{"start":"tsx src/index.ts","start:api":"tsx src/api/server.ts","dev":"vite","build":"tsc && vite build","build:frontend":"vite build","preview":"vite preview","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","format":"prettier --write \"src/**/*.{ts,json}\"","format:check":"prettier --check \"src/**/*.{ts,json}\""},"dependencies":{"cors":"^2.8.5","express":"^5.1.0","react":"^18.3.1","react-dom":"^18.3.1","tsx":"^4.7.0"},"devDependencies":{"@jest/globals":"^30.2.0","@types/cors":"^2.8.19","@types/express":"^5.0.5","@types/jest":"^30.0.0","@types/node":"^20.10.0","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@typescript-eslint/eslint-plugin":"^8.46.4","@typescript-eslint/parser":"^8.46.4","@vitejs/plugin-react":"^4.3.1","eslint":"^9.39.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^5.1.0","jest":"^30.2.0","prettier":"^3.6.2","ts-jest":"^29.4.5","typescript":"^5.9.3","typescript-eslint":"^8.46.4","vite":"^5.4.2"},"_id":"@carlasanudo44/booking-app@1.0.0","gitHead":"d92103c94fd263b04e7c96df0d50f1d0fe39be80","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-Q4xaFMQq/u5tlxYgX2f9TWZFGBFYZlGjWE2RBE832RLQDNoOef1cofFjSpVcMq7Z0jb5Pn/HZWy78SmmCSebnA==","shasum":"fded46c7930d66b7ce0d53b624b3273d5895d911","tarball":"https://registry.npmjs.org/@carlasanudo44/booking-app/-/booking-app-1.0.0.tgz","fileCount":34,"unpackedSize":47486,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD1eETjDp3f/qP8KEOGlXg5NwUfHIPbskSTn4SXM2KEFgIhAIGlM3OeNs1VnMOUwItK+iTf65PziTb/MdjWXoKx732U"}]},"_npmUser":{"name":"carlasanudo44","email":"carla.sanudo@pasbridge.com"},"directories":{},"maintainers":[{"name":"carlasanudo44","email":"carla.sanudo@pasbridge.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/booking-app_1.0.0_1764666720809_0.9102794018966625"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-02T09:12:00.718Z","1.0.0":"2025-12-02T09:12:00.988Z","modified":"2025-12-02T09:12:01.203Z"},"maintainers":[{"name":"carlasanudo44","email":"carla.sanudo@pasbridge.com"}],"description":"Booking system library with authentication and booking management","readme":"# Booking System Console App\n\nA comprehensive console-based booking system for apartment rentals with support for clients and hosts.\n\n## Features\n\n- **User Authentication**: Login and registration for both clients and hosts\n- **Apartment Listings**: Hosts can create and manage apartment listings with pricing, amenities, and descriptions\n- **Calendar View**: Visual calendar showing available dates for each apartment\n- **Booking Management**: \n  - Clients can make bookings\n  - Hosts can approve or reject pending bookings\n  - Both can cancel bookings\n- **Price Calculation**: Automatic price calculation based on number of nights\n- **Availability Checking**: System prevents double-booking and checks date availability\n\n## Getting Started\n\n### Installation\n\n```bash\nnpm install\n```\n\n### Running the Application\n\n```bash\nnpm start\n```\n\n## Sample Accounts\n\nThe application comes with pre-configured sample accounts:\n\n**Host Account:**\n- Username: `host1`\n- Password: `host123`\n\n**Client Account:**\n- Username: `client1`\n- Password: `client123`\n\n## Usage Guide\n\n### For Clients\n\n1. **Login** with your client credentials\n2. **Browse Apartments** to see available listings\n3. **View Apartment Calendar** to check available dates\n4. **Make a Booking** by selecting an apartment and providing:\n   - Check-in date (YYYY-MM-DD format)\n   - Check-out date (YYYY-MM-DD format)\n   - Number of guests\n5. **View My Bookings** to see all your bookings and their status\n6. **Cancel Booking** if needed\n\n### For Hosts\n\n1. **Login** with your host credentials\n2. **View My Apartments** to see your listings\n3. **Add New Apartment** with details like:\n   - Title and description\n   - Location\n   - Price per night\n   - Maximum guests\n   - Amenities (comma-separated)\n4. **View Pending Bookings** to see bookings awaiting approval\n5. **Approve/Reject Booking** to manage booking requests\n6. **View All Bookings** to see all bookings for your apartments\n\n### Guest Access\n\nEven without logging in, you can:\n- Browse available apartments\n- View apartment details and pricing\n\n## Project Structure\n\n```\nbooking.test/\n├── index.ts              # Main application entry point and console interface\n├── types.ts              # TypeScript type definitions\n├── store.ts              # In-memory data store\n├── auth.ts               # Authentication service\n├── booking-service.ts    # Booking business logic\n├── utils.ts              # Utility functions (date formatting, calendar display, etc.)\n├── package.json\n└── tsconfig.json\n```\n\n## Technical Details\n\n- **Language**: TypeScript\n- **Runtime**: Node.js\n- **Module System**: ES Modules\n- **Data Storage**: In-memory (data resets on restart)\n\n## Date Format\n\nWhen making bookings, use the format: `YYYY-MM-DD` (e.g., `2024-12-25`)\n\n## Calendar Legend\n\n- `[XX]` = Today\n- `XX` = Available date\n- `X` = Unavailable date\n\n","readmeFilename":"README.md","_rev":"1-82721d6aa3e07b4ac03d3bf65cc99301"}