Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-drf

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-drf

A full-stack framework combining Next.js and Django Rest Framework.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-38.46%
Maintainers
0
Weekly downloads
 
Created
Source

Here’s the content formatted specifically for a README.md file:


Next-DRF: The Ultimate Full-Stack Framework

🚀 Next-DRF is a developer-friendly, highly scalable full-stack framework combining the power of Next.js for the frontend and Django Rest Framework (DRF) for the backend. Designed for simplicity and flexibility, it enables developers to build robust applications effortlessly while supporting modern best practices like Tailwind CSS for styling and seamless authentication integrations.


Why Next-DRF?

  1. Seamless Full-Stack Development: Combines the best of React and Django under one roof.
  2. Flexibility: Offers multiple authentication providers like AWS Cognito, Firebase, Auth0, Okta, and custom implementations.
  3. Preconfigured Setup: Get started with built-in routing, Tailwind CSS, and API integrations out of the box.
  4. Developer-Centric: Supports environment-based configurations, secure API key management, and auto-migration commands.
  5. Scalable: Ready for microservices, multi-database support, and modern deployment strategies.

Features

  • Frontend: Built with Next.js 15 using both App Router and Page Router for flexibility.
  • Backend: Powered by Django Rest Framework with pre-configured user authentication and APIs.
  • Styling: Pre-integrated with Tailwind CSS for rapid and responsive UI development.
  • Authentication: Support for multiple authentication providers:
    • AWS Cognito
    • Firebase
    • Auth0
    • Okta
    • Custom User Authentication
  • CLI Tools: Simplifies project setup and management with commands like npx next-drf-cli.
  • Scalable Architecture: Ideal for modern full-stack and microservice-based applications.

Getting Started

Installation

# Clone the repository
npx next-drf@latest

# Install dependencies
npm install

Starting the Project

Run the frontend and backend servers with a single command:

npm run dev

This will:

  1. Start the Next.js frontend server at http://localhost:3000.
  2. Start the Django backend server at http://localhost:8000.

Backend Setup

Virtual Environment

Set up a Python virtual environment:

python -m venv env
source env/bin/activate  # For Linux/Mac
env\Scripts\activate     # For Windows
Install Backend Dependencies
pip install -r requirements.txt
Database Migrations

Run migrations to set up the database:

npm run migrate

Frontend Development

The frontend is built with Next.js:

npm run dev:frontend

Backend Development

Run the Django server:

npm run dev:backend

Authentication Providers

Next-DRF supports multiple authentication providers. Select your preferred provider by setting the AUTH_PROVIDER environment variable in .env:

AUTH_PROVIDER=cognito  # Options: cognito, firebase, auth0, okta, custom
Example .env File
API_KEY=your_api_key_here
AUTH_PROVIDER=cognito
AWS_REGION=your_aws_region
AWS_COGNITO_APP_CLIENT_ID=your_cognito_app_client_id

CLI Commands

Next-DRF comes with a powerful CLI tool:

npx next-drf-cli

Available Commands:

  1. Initialize a New Project

    npx next-drf-cli init
    

    Sets up the project structure and installs dependencies.

  2. Add a New Django App

    npx next-drf-cli add-app <app-name>
    
  3. Run Migrations

    npx next-drf-cli migrate
    
  4. Start the Servers

    npx next-drf-cli dev
    

Directory Structure

next-drf/
├── next-frontend/       # Next.js application
│   ├── public/          # Static assets
│   ├── src/             # Source files
│   └── tailwind.config.js # Tailwind CSS configuration
├── dra-backend/         # Django application with DRF
│   ├── env/             # Virtual environment
│   ├── draBackend/      # Django project settings
│   └── manage.py        # Django management script
├── scripts/             # CLI and helper scripts
├── package.json         # Node.js dependencies
└── README.md            # Project documentation

Roadmap

  1. Add GraphQL Support for more flexible API queries.
  2. Introduce Microservices for larger-scale applications.
  3. Extend Authentication to include SSO and OAuth providers.
  4. Automate Deployment with Docker and Kubernetes configurations.

Contributing

We welcome contributions from the community! 🚀
Feel free to open issues or submit pull requests on GitHub.


License

Next-DRF is developed by Cointavia and is licensed under the MIT License.


Built with ❤️ by Cointavia
Empowering developers to build faster, smarter, and more scalable applications.


Let me know if there’s anything you’d like to adjust! 🚀

Keywords

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc