Skip to content

ayekyiphyu/api_create

Repository files navigation

ReserveIt App

A reservation calendar application with memo creation functionality. Built with Django backend, PostgreSQL database, and React Next.js frontend.

Features

  • Reservation Calendar: Create and manage calendar events
  • Personal Memos: Create and organize your own memos
  • Full-Stack Architecture: Modern web application with REST API

Tech Stack

  • Backend: Python Django
  • Database: PostgreSQL
  • Frontend: React with Next.js
  • Development Environment: Windows WSL (Windows Subsystem for Linux)

Prerequisites

  • Python 3.8+
  • Node.js 16+
  • PostgreSQL
  • Windows WSL (if developing on Windows)

Installation

Backend Setup

  1. Clone the repository

    git clone git@github.com:ayekyiphyu/api_create.git
    cd api_create
  2. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows WSL
  3. Install Python dependencies

    pip install -r requirements.txt
  4. Database Setup

    # Install PostgreSQL (Ubuntu/WSL)
    sudo apt update
    sudo apt install postgresql postgresql-contrib
    
    # Start PostgreSQL service
    sudo service postgresql start
    
    # Create database
    sudo -u postgres createdb reserveit_db
  5. Environment Configuration

    # Copy environment file
    cp .env.example .env
    
    # Edit .env file with your database credentials
    nano .env
  6. Run migrations

    python manage.py makemigrations
    python manage.py migrate
  7. Create superuser

    python manage.py createsuperuser
  8. Start development server

    python manage.py runserver

Frontend Setup

  1. Navigate to frontend directory

    cd frontend  # or wherever your Next.js app is located
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Start development server

    npm run dev
    # or
    yarn dev

Usage

  1. Access the application

    • Backend API: http://localhost:8000
    • Frontend: http://localhost:3000
    • Admin Panel: http://localhost:8000/admin
  2. Create reservations

    • Navigate to the calendar interface
    • Click on desired date/time slots
    • Fill in reservation details
  3. Manage memos

    • Access memo section
    • Create, edit, and organize personal notes

Development

Running Tests

# Backend tests
python manage.py test

# Frontend tests
npm test

Code Style

# Python formatting
black .
flake8 .

# JavaScript formatting
npm run lint

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit changes (git commit -m 'Add new feature')
  4. Push to branch (git push origin feature/new-feature)
  5. Create Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Troubleshooting

Common Issues

  • PostgreSQL connection errors: Ensure PostgreSQL service is running
  • Permission denied: Use sudo for system-level operations in WSL
  • Port conflicts: Check if ports 3000 and 8000 are available

WSL-Specific Notes

  • PostgreSQL service may need to be started manually: sudo service postgresql start
  • File permissions might need adjustment when working between Windows and WSL

Password

## superuser

 * username : test@gmail.com
 * password : test12345

# normaluser
* username : mt@gmail.com
* password : test12345

# forget password (request)

*  'email': 'user@example.com'if you use this email api is working and password will be reset.

About

djangoを使っています。(for using memo-app backend)

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors