Skip to content

Backend for ACM-SIST (Sathyabama Institute of Science and Technology) Club

License

Notifications You must be signed in to change notification settings

kishor1445/ACM_SIST_Backend

Repository files navigation


ACM-SIST Backend

This is the backend for ACM-SIST (Sathyabama Institute of Science and Technology) Student Chapter Club

Features

  • /users -> Create User, Login User, Verify User, Send Verify Mail (for resend), Forgot Password, Reset Password [U] and Current User [U]
  • /members -> Create Member, Login Member, Update Member [M], Search Member, Reset Password [M] and Current Member [M]
  • /events -> Create Event [M], Update Event [M], Delete Event [M], Search Event, Register Event [M], My Events [U], Pending Verification [M]
  • /payment_proof -> Upload Payment Screenshot and Get Payment Screenshot [M]
  • /blogs -> Create Blog [M], Update Blog [M], Delete Blog [M] and Get Blogs
  • /achievements -> Get Number of Users, Members and Events
  • /export -> Get data from database [M]
  • /favicon.ico -> In case if a browser request /favicon.ico to show Favicon Icon (Happens when the user clicks the verification link sent on email)

[U] -> User Login Required
[M] -> Member Login Required

TODO

  • Write Tests for all API endpoints
  • API Documentation

Instructions to Setup the Server

Required: Python >= 3.10

Download Python

Download From Python Official Website

CLI Installation of Python

# Arch Linux
sudo pacman -S python
sudo pacman -S python-pip
# If you are not using arch please refer your OS package manager to install 

# Mac
brew install python

Get the code

git clone https://github.com/kishor1445/ACM_SIST_Backend.git
cd ACM_SIST_Backend

Local Machine

NOTE: If you are gonna run the server locally on your system then it is recommended to setup the virtual environment

# Create Virtual Environment
python3.12 -m venv .venv

# Activate Virtual Environment
# Windows
.\.venv\Scripts\activate

# Linux/Mac
source .venv/bin/activate

Install Requirements

pip install -r requirements.txt

If you get an error like command not found or pip is not a recognized command then try pip3. If you still get an error then it means pip is not installed or it is not added to PATH. Please search on the internet to fix that problem

If you are testing/developing the server then install requirements-dev.txt as well

Configuration

Create the file called .env in the root directory of the project and set the values for the below environment variables

MAIL_USER=<EMAIL_ID>
MAIL_PASS=<EMAIL_PASSWORD>
SECRET_KEY=<YOUR_SECRET_KEY>
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_DAYS=2
ACM_SIST_CHAIR=<NAME>

NOTE: <EMAIL_PASSWORD> is the App Password. Please refer this link to create App Password

Run the server

uvicorn app.main:app

License

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

About

Backend for ACM-SIST (Sathyabama Institute of Science and Technology) Club

Topics

Resources

License

Stars

Watchers

Forks