[Project Status: Completed] | [Role: Software Development & Data Analysis Intern]
As part of a 7-month internship with SeQuenX B.V., I independently developed a full-stack web application and RESTful API. The project involved end-to-end development, from database design and backend logic to frontend user interface creation and cloud deployment. This project showcases skills in Python, Django, SQL, and Agile project management. It showcases a collection of applications, including:
- A Django-powered backend for user management and API capabilities.
- A React-based frontend app providing a responsive user interface.
- A FastAPI app serving as the integration point for Python logic within the React app.
- Backend (Django): Contains the core server logic and user management.
- Frontend (React): A responsive user interface with its own standalone functionality.
- Integration (FastAPI): Provides API endpoints consumed by the React frontend for specific Python logic.
- Other folders: Supporting files such as
requirements.txt,.env, and.gitignorefor environment configuration and dependency management.
-
User Management:
- User registration with email and password.
- Secure login using Django’s built-in authentication.
- Profile management: Edit fields such as name, email, phone number, and profile picture.
-
API Design:
- Built with Django REST Framework (DRF).
- Endpoints:
POST /api/user/UserRegisterView/: Register a new user.POST /api/token/: Authenticate user and retrieve a token.GET /api/session/CurrentUserView/: Fetch current logged in user.GET /api/user/find-users-by-first-name/: Fetch all information on a user by searching their first name.PUT /api/user/EditPhoneNumber/: Update the users' phone number.POST /api/session/UserSessionLoginView/: Logs in a selected user.POST /api/session/UserLogoutView/: Logs current active user out.
-
Database:
- Uses mySQL for local development - experimented with S3 buckets but did not succeed.
- Custom django models for User and Profile.
-
Validation and Security:
- Input validation via DRF serializers.
- Secure token-based authentication.
-
Unit Tested:
- Completed a fairly comprehensive set of unit tests going over many cases:
- Invalid user credentials such as email or password.
- Failing validation when registering a user such as incorrect phone number format.
- Missing fields when logging in or registering a user.
- Logging in an inactive user.
- Password 1 and 2 do not match in registration.
- Test coverage was over 65%, sitting at around 69-73% overall.
- Completed a fairly comprehensive set of unit tests going over many cases:
-
Development Setup:
- Install dependencies:
pip install -r requirements.txt - Run migrations:
python manage.py migrate - Start the server:
python manage.py runserver
- Install dependencies:
- Initialized the Django project and set up a virtual environment.
- Designed user models and implemented registration and login functionality.
- Created validation logic for fields including custom validators for passwords and phone numbers.
- Configured the Django REST Framework for building APIs.
- Fixed authentication issues between custom and default Django models.
- Researched and resolved issues with JWT authentication clashing with Django's default authentication.
- Integrated Swagger for API documentation.
- Experimented with deployment via AWS. Used Elastic Beanstalk and ECS but ran into compatibility issues with their virtual linux systems.
settings.py: Configurations for the Django project.models.py: Database models for the app.views.py: Logic for handling API requests.serializers.py: Transforming data between JSON and Python.
-
User Interface:
- Clean and responsive design using React and CSS.
- Pages include:
- Registration form
- Login form
- Profile editor
- Calculator
- Contact form
- Javascript showcase
- Python showcase
-
API Integration:
- Interacts with the FastAPI backend for dynamic features.
- Axios is used for making HTTP requests.
-
Validation and Feedback:
- Frontend validation for forms.
- Toast notifications for errors and successes.
-
Development Setup:
- Install dependencies:
npm install - Run the app:
npm start
- Install dependencies:
- Set up GitHub and established the repository for the React project as well as for the django app too.
- Structured the React project with reusable components and organized pages.
- Built essential UI elements such as a navigation bar, login page, and registration form.
- Styled components using CSS features like gradients, shadows, and media queries.
- Added dynamic features like a working calculator and profile page generator.
- Resolved CSS scope and conflict issues.
- Integrated API calls for dynamic interaction with the FastAPI backend.
src/components: Contains reusable UI components.src/pages: Contains page-specific components like Login and Profile.src/context/AuthContext.js: Authentication state management.src/utils/api.js: API interaction logic.
-
Python Logic Integration with React:
- Provides specific functionality implemented in Python.
- Exposes endpoints consumed by the React frontend for dynamic interactions on the 'Python' page in react.
-
API Design:
- Endpoints:
GET /plot HTTP/: Performs server-side computations and returns a plot of the results.GET /code HTTP/: When a button is pressed on the frontend, a message is displayed generated from the backend.POST /analyse-data HTTP/: User inputted string of numbers will get analysed with python and then return some light analysis and a graph of the data.
- Endpoints:
-
Development Setup:
- Install dependencies:
pip install -r requirements.txt - Run the server:
uvicorn main:app --reload
- Install dependencies:
- Selected FastAPI as the web framework for Python integration for a lightweight app.
- Created API endpoints for computations and dynamic interactions with React.
main.py: Entry point for the FastAPI app.routes.py: Contains API endpoint logic.requirements.txt: Dependencies for FastAPI.
-
Backend (Django):
- Use Gunicorn or uWSGI with Nginx for production.
- Environment variables managed via
.env. - Ensure static files are collected.
-
Frontend (React):
- Build for production using
npm run build. - Serve static files through Nginx or a CDN.
- Build for production using
-
FastAPI:
- Deploy using Gunicorn or uvicorn in production mode.
- Configure endpoints to serve through Nginx.
- Create a UI for the backend django app so there is a responsive frontend for users.
- Migrate to PostgreSQL for production and explore different options for databases.
- Work on deployment a little more to try and get it working properly.
Special thanks to the team at SeQuenX for the opportunity to work on this project and for their guidance throughout the internship.
This project is licensed under the MIT License. See the LICENSE file for more details.