A modern note-taking application built with Laravel, React, and OpenAI integration, featuring Google OAuth authentication and AI-powered note enhancement.
- Google OAuth integration for seamless login
- Secure user profile management
- Protected routes and API endpoints
- Create, read, update, and delete notes
- Clean and intuitive editor interface
- Auto-save functionality
- Tag-based organization
- OpenAI integration for intelligent note analysis
- Automatic tag generation based on note content
- Real-time AI response streaming
- Powered by GPT-3.5 Turbo model
- Note Statistics component built with raw PHP
- Provides insights on note creation patterns
- Seamlessly integrates with the Laravel application
- Frontend: React, Inertia.js, TailwindCSS
- Backend: Laravel 10.x
- Database: MySQL
- Authentication: Google OAuth
- AI Integration: OpenAI API
- Raw PHP Component: Note Statistics
- PHP 8.1 or higher
- Composer
- Node.js and NPM
- MySQL
- Google Cloud Platform account (for OAuth)
- OpenAI API key
- Clone the repository:
git clone [repository-url]
cd [project-directory]- Install PHP dependencies:
composer install- Install JavaScript dependencies:
npm install- Create environment file:
cp .env.example .env- Generate application key:
php artisan key:generate- Configure your
.envfile with the following variables:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:8000/auth/google/callback
OPENAI_API_KEY=your_openai_api_key- Run migrations:
php artisan migrate- Build assets:
npm run build- Start the development server:
php artisan serve- Go to Google Cloud Console
- Create a new project
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:8000/auth/google/callback - Copy Client ID and Client Secret to
.envfile
- Get your API key from OpenAI Platform
- Add the API key to your
.envfile
├── app/
│ ├── Http/
│ │ ├── Controllers/
│ │ │ ├── Auth/
│ │ │ │ └── GoogleController.php
│ │ │ └── NoteController.php
│ │ │
│ │ └── Services/
│ │ └── NoteStatistics.php
│ ├── config/
│ │ ├── services.php
│ │ └── openai.php
│ ├── database/
│ │ └── migrations/
│ ├── public/
│ │ └── NoteStatistics.php
│ ├── resources/
│ │ └── js/
│ │ ├── Components/
│ │ │ └── GoogleLoginButton.jsx
│ │ └── Pages/
│ │ └── Notes/
│ └── routes/
│ └── web.php
The Note Statistics component (public/NoteStatistics.php) is built using raw PHP and provides:
- Note creation statistics
- Tag usage analysis
- Integration with the main Laravel application through a service class
- Set up your production environment variables
- Configure your web server (Apache/Nginx)
- Set up SSL certificates
- Update Google OAuth redirect URIs
- Run production build:
npm run build
php artisan config:cache
php artisan route:cacheGET /notes- List all notesPOST /notes- Create a new noteGET /notes/{id}- View a notePUT /notes/{id}- Update a noteDELETE /notes/{id}- Delete a note
POST /notes/{id}/generate-tags- Generate AI tags for a note
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.
- Riazul Islam
- Email: engr.riazul@gmail.com